I am trying to get control over the children instances of a component and can't go past an error. I am trying to follow along the answers from this issue.
The parent component Sequence
contains children components of SequenceStep
. The parent contains the following declaration:
@ViewChildren(SequenceStep) steps: QueryList<SequenceStep>;
then I am trying to do something about the children:
ngAfterViewInit() {
this.steps.changes.subscribe(steps => {
console.log(steps);
});
}
The error I'm getting is:
metadata_resolver.js:639 Uncaught Error: Can't construct a query for the property "steps" of "Sequence" since the query selector wasn't defined.
whereas both Sequence
and SequenceStep
components do have their selectors defined in their @Component
decorators (sequence
and sequence-step
respectively).
What am I doing wrong here?