Problem Statement
What are Standalone Components and how do they simplify apps?
Explanation
Standalone components remove the need for NgModules. You declare `standalone: true`, import dependencies directly in the component, and wire routes with `loadComponent`. This reduces boilerplate and improves tree-shaking.
Code Solution
SolutionRead Only
@Component({ selector:'app-hero', standalone:true, imports:[CommonModule], template:'…' })
export class HeroComponent {}Practice Sets
This question appears in the following practice sets: