X Tutup
Skip to content

Commit 4bfe49c

Browse files
shuheialexeagle
authored andcommitted
docs(core): update QueryList's onChange to changes.subscribe
1 parent cee2318 commit 4bfe49c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/angular2/src/core/metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ export var ViewChild: ViewChildFactory = makePropDecorator(ViewChildMetadata);
11661166
* shown: boolean;
11671167
*
11681168
* constructor(private @Query(Item) items:QueryList<Item>) {
1169-
* items.onChange(() => console.log(items.length));
1169+
* items.changes.subscribe(() => console.log(items.length));
11701170
* }
11711171
* }
11721172
* ```

modules/angular2/src/core/metadata/di.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export class ContentChildMetadata extends QueryMetadata {
254254
* shown: boolean;
255255
*
256256
* constructor(private @Query(Item) items:QueryList<Item>) {
257-
* items.onChange(() => console.log(items.length));
257+
* items.changes.subscribe(() => console.log(items.length));
258258
* }
259259
* }
260260
* ```

0 commit comments

Comments
 (0)
X Tutup