Angular’s Improved Tooling: Standalone Migration Magic
Navigating New Tools and Migration Schematics

In Angular 15, the new standalone APIs graduated from developer preview and are now part of the stable API. To support developers transitioning their apps to standalone APIs, the Angular team provided two new tools: a standalone migration schematic and the standalone ng new collection. In this post, we will go over both of them along with an example of the standalone migration schematic put to use in an awesome open-source project.
Standalone Migration Schematic
Available from version 15.2, this schematic’s main goal is to help developers convert existing projects to the new standalone APIs. Along with it, the team created a great standalone migration guide. As explained in the guide, the schematic aims to convert as much code automatically, but it may require some manual fixes and updates by the project author, as we will see later in this post.
Pre-requisites
Before running the schematic, the project author must ensure that the project:
- Is using at least Angular 15.2.0
- Builds without any compilation errors
- Is on a clean Git branch
Standalone Migration Schematic
The standalone migration consists of the following three steps (referred to as modes by the schematic):
- Convert declarations for all components, directives, and pipes to standalone
- Remove unnecessary NgModules.
- Switch to standalone bootstrapping API.
In order to run the schematic, use the following command.
ng generate @angular/core:standalone
After running the command, the CLI will prompt you with the three migration steps as can be seen in the image:

Using the arrow keys, select the steps and make sure you run them in the specified order (convert-to-standalone first, then prune-ng-modules, and lastly standalone-bootstrap). Along with this, it is important to make sure the project builds correctly between each step.
About HeroDevs
HeroDevs keeps businesses secure and compliant when the open source packages they depend on reach end-of-life. Through our Never-Ending Support product library, customers can stay on fully supported versions of open source packages that have been sunsetted by their authors.
HeroDevs’ team of elite software engineers and architects also offers consulting and engineering services to help clients migrate off of deprecated open source packages and modernize their tech stack.