mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
docs(core): update QueryList's onChange to changes.subscribe
This commit is contained in:
parent
cee2318110
commit
4bfe49cd42
2 changed files with 2 additions and 2 deletions
|
|
@ -1166,7 +1166,7 @@ export var ViewChild: ViewChildFactory = makePropDecorator(ViewChildMetadata);
|
|||
* shown: boolean;
|
||||
*
|
||||
* constructor(private @Query(Item) items:QueryList<Item>) {
|
||||
* items.onChange(() => console.log(items.length));
|
||||
* items.changes.subscribe(() => console.log(items.length));
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ export class ContentChildMetadata extends QueryMetadata {
|
|||
* shown: boolean;
|
||||
*
|
||||
* constructor(private @Query(Item) items:QueryList<Item>) {
|
||||
* items.onChange(() => console.log(items.length));
|
||||
* items.changes.subscribe(() => console.log(items.length));
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
|
|
|
|||
Loading…
Reference in a new issue