-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimefreq1: lowtype: bug/fix
Milestone
Description
I'm submitting a ... (check one with "x")
[ x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
@ContentChildren will select the host component if the component selector matches it.
<foo the-root>
<foo></foo>
<foo></foo>
<foo></foo>
</foo>
And for the-root
@ContentChildren(FooComponent) foos;
assert(foos.length === 4);
Expected/desired behavior
The foo host component should not be selected.
assert(foos.length === 3);
Reproduction of the problem
https://plnkr.co/edit/E7D0nMdHnPr0OxfxzysB?p=preview
What is the motivation / use case for changing the behavior?
Semantically, one would expect the selection of @ContentChildren to be only strict descendants.
Please tell us about your environment:
- Angular version: 2.0.0-rc.0
- Browser: all
- Language: all
hworld, lazarljubenovic, rburnham52, allenhwkim, gusumuzhe and 10 more
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimefreq1: lowtype: bug/fix