angular: ContentChildren not working by Component ref.

I’m submitting a … (check one with “x”)

[x ] bug report => search github for a similar issue or PR before submitting
[ ] 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 Can no longer fetch content children that are not direct children of the parent component.

Expected behavior I should be able to fetch the children no matter where they are nested in the parent component.

Reproduction of the problem http://plnkr.co/edit/F4DwHzL1I8ByT6y6slsk

What is the motivation / use case for changing the behavior? It has worked all through beta/rc releases but now not on go live.

Please tell us about your environment: Chrome, Ubuntu

  • Angular version: 2.0.0
  • Browser: all
  • Language: all
  • Node (for AoT issues): node --version =

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (7 by maintainers)

Commits related to this issue

Most upvoted comments

fixed in #11672

@damiandennis @zoechi this is a real issue in our code: 1- you should not need explicit {descendants: true} - this should be the default, 2- you probably should not be able to override this default (at least type checking should error).

Will fix this in a coming PR. Thanks for the report and the repros !

Edit: I was wrong about 2, you should be able to set it - the PR will only change the default value to match whatever is was before (true).