How can I access the \"content\" of a component from within the component class itself?
I would like to do something like this:
<
https://angular.io/api/core/ContentChildren
class SomeDir implements AfterContentInit {
@ContentChildren(ChildDirective) contentChildren : QueryList;
ngAfterContentInit() {
// contentChildren is set
}
}
Note that if you do console.log(contentChildren), it will only work on ngAfterContentInit or a later event.