What kinds of changes do ViewChildren and ContentChildren QueryLists listen for?

Viewed 7931

Let's say you had the following code:

<code>@ViewChildren('item') items: QueryList<any>;</code>

And somewhere else the code:

<code>this.items.changes.subscribe(() => {})</code>

What are the changes that would cause () => {} to be called? What about @ContentChildren()? I couldn't find any documentation on this.

Additionally, is there a way to get more information about the change that happened? (e.g. the type of change, the element with which the change occurred, etc.)

EDIT: The answer to the "Additionally" portion above can be found in the comments section of the answer that is marked correct.

1 Answers
Related