Creating Standalone Components

Learn about the Angular standalone components and how to create them.

A component that is not registered with an Angular module is called a standalone component. Standalone components do not need a compilation context from an Angular module because they import any Angular artifacts they need by themselves. To create a standalone component using the Angular CLI, we pass the standalone option in the generate command that we learned about earlier:

Note: The command below is for creating a standalone component locally using the Angular CLI.

Get hands-on with 1400+ tech skills courses.