refactor(external-router): remove the external router controller, move the reconciliation methods to the nav itself, and move the external activation status information to ion-app

This commit is contained in:
Dan Bucholtz
2018-02-15 23:14:09 -06:00
parent 902c4c7f72
commit 3f6e1ddbcd
13 changed files with 213 additions and 217 deletions

View File

@@ -26,12 +26,7 @@ export function isString(something: any) {
return typeof something === 'string' ? true : false;
}
export function ensureExternalRounterController(): Promise<HTMLIonExternalRouterControllerElement> {
const element = document.querySelector('ion-external-router-controller');
if (element) {
return (element as any).componentOnReady();
}
const toCreate = document.createElement('ion-external-router-controller');
document.body.appendChild(toCreate);
return (toCreate as any).componentOnReady();
export function getIonApp(): Promise<HTMLIonAppElement> {
const element = ensureElementInBody('ion-app') as HTMLIonAppElement;
return element.componentOnReady();
}