mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
refactor(nav): add initial support for url in general, add integration w/ ng-router
This commit is contained in:
@ -298,3 +298,12 @@ export function debounce(func: Function, wait = 0) {
|
||||
timer = setTimeout(func, wait, ...args);
|
||||
};
|
||||
}
|
||||
|
||||
export function getNavAsChildIfExists(element: HTMLElement): HTMLIonNavElement {
|
||||
for (let i = 0; i < element.children.length; i++) {
|
||||
if (element.children[i].tagName.toLowerCase() === 'ion-nav') {
|
||||
return element.children[i] as HTMLIonNavElement;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user