Course lesson
Make Components, Directives and Pipes standalone using Angular Migrations
Use automatic migration to make your angular codebase standalone. Or follow a manual step-by-step migration, if needed.
- Duration
- 12 min
- Access
- Included
- Transcript
- Retained from source evidence
Use automatic migration to make your angular codebase standalone. Or follow a manual step-by-step migration, if needed.
To use standalone components, add the standalone: true property to the component decorator and explicitly import necessary Angular features in the imports array. For instance, if your component utilizes NgIf, include it in the imports array.
When bootstrapping a standalone component, utilize the bootstrapApplication function, replacing the bootstrapModule function.
Existing Angular applications can be incrementally migrated to standalone components using the Angular CLI schematic ng generate @angular/core:standalone. This schematic assists in converting existing code and transitioning to the standalone bootstrapping API.