mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
feat(menu): add console error for incorrect usage of contentId (#23871)
resolves #23810
This commit is contained in:
@ -179,6 +179,11 @@ AFTER:
|
|||||||
console.error('Menu: must have a "content" element to listen for drag events on.');
|
console.error('Menu: must have a "content" element to listen for drag events on.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.el.contains(content)) {
|
||||||
|
console.error(`Menu: "contentId" should refer to the main view's ion-content, not the ion-content inside of the ion-menu.`);
|
||||||
|
}
|
||||||
|
|
||||||
this.contentEl = content as HTMLElement;
|
this.contentEl = content as HTMLElement;
|
||||||
|
|
||||||
// add menu's content classes
|
// add menu's content classes
|
||||||
|
|||||||
Reference in New Issue
Block a user