I've been facing an issue while attempting to control the child instances of a component and I can't seem to bypass this particular error. I've been referring to solutions provided on this specific thread.
The main component Sequence
houses child components of SequenceStep
. In the parent component, the following declaration is present:
@ViewChildren(SequenceStep) steps: QueryList<SequenceStep>;
Then, I'm trying to manipulate these child components as follows:
ngAfterViewInit() {
this.steps.changes.subscribe(steps => {
console.log(steps);
});
}
The issue that arises 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.
Even though both Sequence
and SequenceStep
components have their selectors defined in their respective @Component
decorators (sequence
and sequence-step
), this error persists.
What could possibly be the mistake I'm making here?