question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Values emitted from the “changes” of QueryList are of type “any”

See original GitHub issue

🚀 feature request

Relevant Package

This feature request is for @angular/core.

Description

QueryList<T> emits changes as Observable<any> instead of Observable<QueryList<T>>.

https://github.com/angular/angular/blob/25f79ba73e19bcf7c0925283a2dfdf2d9186eb49/packages/core/src/linker/query_list.ts#L48

Describe the solution you’d like

public readonly changes: Observable<QueryList<T>> = new EventEmitter();

Describe alternatives you’ve considered

Manual casting.

Breaking change

Kinda?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
pkozlowski-opensourcecommented, Aug 14, 2020

There is already a PR for this: #30375

And this is a duplicate of the existing issue #30296 Closing as a duplicate of #30296

1reaction
JoostKcommented, Aug 14, 2020

There is already a PR for this: #30375

Read more comments on GitHub >

github_iconTop Results From Across the Web

QueryList changes subscribe does not work - Stack Overflow
So you just don't have a chance to subscribe to its changes before ... Does this SAE conversion map work for any tools...
Read more >
QueryList - Angular
first: T, Read-Only. last: T, Read-Only. changes: Observable<any>, Read-Only. Returns Observable of QueryList notifying the subscriber of changes.
Read more >
QueryList changes event not triggered by changes in children.
QueryList changes event not triggered by changes in children. ... childrenNoTrackBy.changes.subscribe((changes: any) => { // never triggered }.
Read more >
Angular - Understanding How To Use QueryList Properly.
Any time a child element is added, removed, or moved, the query list will be updated, and the changes observable in the query-list...
Read more >
Understanding ViewChildren, ContentChildren, and QueryList ...
Any time a child element is added, removed, or moved, the query list will be updated, and the changes observable of the query...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found