
We changed the bootstrap order: 1. create NgZone 2. bootstrap ng1 inside NgZone and upgrade ng1 components to ng2 components. 3. bootstrap ng2 with NgZone Note: Previous footgun behavior was: bootstrap ng2 first to extract NgZone, so that ng1 bootstrap can happen in NgZone. This meant that if ng2 bootstrap eagerly compiled a component which contained ng1 components, then we did not have complete metadata.
23 lines
827 B
TypeScript
23 lines
827 B
TypeScript
/** @experimental */
|
|
export declare class UpgradeAdapter {
|
|
constructor(ng2AppModule?: Type);
|
|
/** @deprecated */ addProvider(provider: Type | Provider | any[] | any): void;
|
|
bootstrap(element: Element, modules?: any[], config?: angular.IAngularBootstrapConfig): UpgradeAdapterRef;
|
|
downgradeNg2Component(type: Type): Function;
|
|
downgradeNg2Provider(token: any): Function;
|
|
upgradeNg1Component(name: string): Type;
|
|
upgradeNg1Provider(name: string, options?: {
|
|
asToken: any;
|
|
}): void;
|
|
}
|
|
|
|
/** @experimental */
|
|
export declare class UpgradeAdapterRef {
|
|
ng1Injector: angular.IInjectorService;
|
|
ng1RootScope: angular.IRootScopeService;
|
|
ng2Injector: Injector;
|
|
ng2ModuleRef: NgModuleRef<any>;
|
|
dispose(): void;
|
|
ready(fn: (upgradeAdapterRef?: UpgradeAdapterRef) => void): void;
|
|
}
|