From 5412e10bcd3799ee1e25847d31e27d78d484ee5e Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Thu, 8 Mar 2018 14:50:22 -0800 Subject: [PATCH] docs(core): replace ancient live demos (#22665) PR Close #22665 --- .../change_detection/change_detector_ref.ts | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) 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; * } * ```