Angular & Signals (283 Qs)•Part 9: NgModules, Providers, NgZone & Injector Hierarchies (213 - 255)
How does angular finds components, directives and pipes?
The Angular compiler finds a component or directive in a template when it can match the selector of that component or directive in that template. Whereas it finds a pipe if the pipe's name appears within the pipe syntax of the template HTML.
Practical Code Example
text
// How Angular resolves selectors:
// Matches HTML tags/attributes against the selectors declared in the component's imports/declarations scope.