mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
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:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user