If you want to transition your angular project to standalone mode, you can use the following command:
ng generate @angular/core:standalone
According to the information provided in the documentation:
Follow these steps in order during the migration process, ensuring that your code builds and functions correctly at each stage:
- Execute
ng g @angular/core:standalone
and choose Convert all components, directives and pipes to standalone
- Execute
ng g @angular/core:standalone
and choose Remove unnecessary NgModule classes
- Execute
ng g @angular/core:standalone
and choose Bootstrap the project using standalone APIs
- Run linting and formatting checks, address any issues, and save the changes
In my experience, there were no errors post-migration, but it is possible for errors to arise in your specific case which may require manual correction.
Finally, ensure to manually remove any remaining modules from your project as they are now redundant.