refactor(nav): add initial support for url in general, add integration w/ ng-router

This commit is contained in:
Dan Bucholtz
2018-01-31 10:52:50 -06:00
committed by GitHub
parent e2b7f64296
commit ab2176b6ce
176 changed files with 17795 additions and 6783 deletions

View File

@ -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;
}