feat(UpgradeComponent): add/improve support for lifecycle hooks
Add support for the `$postDigest()` and `$onDestroy()` lifecycle hooks. Better align the behavior of the `$onChanges()` and `$onInit()` lifecycle hooks with Angular 1.x: - Call `$onInit()` before pre-linking. - Always instantiate the controller before calling `$onChanges()`.
This commit is contained in:

committed by
vikerman

parent
f0cdb428f5
commit
469010ea8e
3
tools/public_api_guard/upgrade/static.d.ts
vendored
3
tools/public_api_guard/upgrade/static.d.ts
vendored
@ -5,10 +5,11 @@ export declare function downgradeComponent(info: ComponentInfo): angular.IInject
|
||||
export declare function downgradeInjectable(token: any): (string | ((i: Injector) => any))[];
|
||||
|
||||
/** @experimental */
|
||||
export declare class UpgradeComponent implements OnInit, OnChanges, DoCheck {
|
||||
export declare class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
|
||||
constructor(name: string, elementRef: ElementRef, injector: Injector);
|
||||
ngDoCheck(): void;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
ngOnDestroy(): void;
|
||||
ngOnInit(): void;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user