angular 2 | @ContentChildren not populated, directive in component

折月煮酒 提交于 2019-12-11 06:49:30

问题


I'm trying to get nested directives from a parent directive with @ContentChildren, but not being populated, occurs when parent directive is placed over a component, component template has child directives.


example 1 (@ContentChildren not populated):

https://plnkr.co/edit/Zdxp017V3zwNYTOR11dR?p=preview

example 2, works fine:

https://plnkr.co/edit/ryIomfokiO40Sw8X6Axd?p=preview

there any way to make it work example 1? or wait for "some-component" content?

thanks in advance

来源:https://stackoverflow.com/questions/39924148/angular-2-contentchildren-not-populated-directive-in-component

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!