diff --git a/packages/core/src/change_detection/change_detector_ref.ts b/packages/core/src/change_detection/change_detector_ref.ts index ed717f0dbb..92372f3480 100644 --- a/packages/core/src/change_detection/change_detector_ref.ts +++ b/packages/core/src/change_detection/change_detector_ref.ts @@ -15,15 +15,15 @@ export abstract class ChangeDetectorRef { * * * - * ### Example ([live demo](http://plnkr.co/edit/GC512b?p=preview)) + * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw)) * * ```typescript * @Component({ - * selector: 'cmp', - * changeDetection: ChangeDetectionStrategy.OnPush, + * selector: 'my-app', * template: `Number of ticks: {{numberOfTicks}}` + * changeDetection: ChangeDetectionStrategy.OnPush, * }) - * class Cmp { + * class AppComponent { * numberOfTicks = 0; * * constructor(private ref: ChangeDetectorRef) { @@ -34,16 +34,6 @@ export abstract class ChangeDetectorRef { * }, 1000); * } * } - * - * @Component({ - * selector: 'app', - * changeDetection: ChangeDetectionStrategy.OnPush, - * template: ` - * - * `, - * }) - * class App { - * } * ``` */ abstract markForCheck(): void; @@ -136,12 +126,9 @@ export abstract class ChangeDetectorRef { /** * Reattach the change detector to the change detector tree. * - * This also marks OnPush ancestors as to be checked. This reattached change detector will be - * checked during the next change detection run. - * * * - * ### Example ([live demo](http://plnkr.co/edit/aUhZha?p=preview)) + * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw)) * * The following example creates a component displaying `live` data. The component will detach * its change detector from the main change detector tree when the component's live property @@ -176,14 +163,14 @@ export abstract class ChangeDetectorRef { * } * * @Component({ - * selector: 'app', + * selector: 'my-app', * providers: [DataProvider], * template: ` * Live Update: * * `, * }) - * class App { + * class AppComponent { * live = true; * } * ```