refactor(core): Move LifeCycle functionality into ApplicationRef.
BREAKING CHANGE: Before: constructor(@Inject(LifeCycle) lifecycle) { lifecycle.tick(); } After: constructor(@Inject(ApplicationRef) appRef) { appRef.tick(); } Closes #5008
This commit is contained in:
@ -126,6 +126,14 @@ export abstract class ChangeDetectorRef {
|
||||
*/
|
||||
abstract detectChanges(): void;
|
||||
|
||||
/**
|
||||
* Checks the change detector and its children, and throws if any changes are detected.
|
||||
*
|
||||
* This is used in development mode to verify that running change detection doesn't introduce
|
||||
* other changes.
|
||||
*/
|
||||
abstract checkNoChanges(): void;
|
||||
|
||||
/**
|
||||
* Reattach the change detector to the change detector tree.
|
||||
*
|
||||
@ -192,6 +200,7 @@ export class ChangeDetectorRef_ extends ChangeDetectorRef {
|
||||
markForCheck(): void { this._cd.markPathToRootAsCheckOnce(); }
|
||||
detach(): void { this._cd.mode = ChangeDetectionStrategy.Detached; }
|
||||
detectChanges(): void { this._cd.detectChanges(); }
|
||||
checkNoChanges(): void { this._cd.checkNoChanges(); }
|
||||
reattach(): void {
|
||||
this._cd.mode = ChangeDetectionStrategy.CheckAlways;
|
||||
this.markForCheck();
|
||||
|
Reference in New Issue
Block a user