Skip to content

Feature request: take directive super-type into account when querying  #8580

@pkozlowski-opensource

Description

@pkozlowski-opensource

Assuming the following markup:

<my-list>
   <my-item>...</my-item>
   <my-fancy-item>...</my-fancy-item>
   <my-super-fancy-item>...</my-super-fancy-item>
   <my-item>...</my-item>
</my-list>

where my-item, my-fancy-item and my-super-fancy-item are directives such that:

class MyItem {
...
}

class MyFancyItem extends MyItem {
...
}

class MySuperFancyItem extends MyItem {
...
}

I would like to query all directives of type MyItem like so:

@ContentChildren(MyItem) allItems: QueryList<MyItem>;

and allItems should contain all instances of my-item, my-fancy-item and my-super-fancy-item (as all of them are passing the foo instanceOf MyItem test.

cc.: @mhevery @tbosch

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions