export class QueryList
export class QueryList
exported from angular2/core defined in angular2/src/core/linker/query_list.ts (line 3)
An unmodifiable list of items that Angular keeps up to date when the state of the application changes.
The type of object that QueryMetadata
and ViewQueryMetadata
provide.
Implements an iterable interface, therefore it can be used in both ES6
javascript for (var i of items)
loops as well as in Angular templates with
*ngFor="#i of myList"
.
Changes can be observed by subscribing to the changes Observable
.
NOTE: In the future this class will implement an Observable
interface.
Example (live demo)
Members
changes : Observable<any>
changes : Observable<any>
Not Yet Documented
length : number
length : number
Not Yet Documented
first : T
first : T
Not Yet Documented
last : T
last : T
Not Yet Documented
map(fn: (item: T) => U) : U[]
map(fn: (item: T) => U) : U[]
returns a new array with the passed in function applied to each element.
filter(fn: (item: T) => boolean) : T[]
filter(fn: (item: T) => boolean) : T[]
returns a filtered array.
reduce(fn: (acc: U, item: T) => U, init: U) : U
reduce(fn: (acc: U, item: T) => U, init: U) : U
returns a reduced value.
toArray() : T[]
toArray() : T[]
converts QueryList into an array
toString() : string
toString() : string
Not Yet Documented