Angular · Middle · Question 50 of 75
When migrating to standalone, how do you keep using an NgModule-based library?
- ✓Correct answer: Add the NgModule to the component's
imports, or useimportProvidersFrom(Module)for its providers - 2NgModule libraries can't be used in standalone apps
- 3Rewrite the library as standalone first
Explanation
Standalone and NgModule code interoperate. The CLI also has a schematic (ng generate @angular/core:standalone) that migrates an existing project step by step.