Open lexon0011 opened 5 years ago
HI,
The original code has been changed, as you can see here: https://github.com/angular/components/blob/e02fa3a2ab2fc5616c633437dd74691bd8a0cf85/src/cdk/schematics/utils/ast.ts#L31
It's possible this change solves your issue, so if you could verify that, it would be awesome! Anyway - I'm planning to update the code, but it may take a while.
Until then, feel free to suggest a solution 🙂
It has been done - the code was refactored to use the original source!
Would you like to check if now, with v2.0.0, the issue still happens?
I am also getting the same issue and has been not able to proceed further.
I have imported same function from @schematics/angular instead of schematics-utilities and now its working.
import {
addProviderToModule,
addImportToModule,
} from "@schematics/angular/utility/ast-utils";
I use the the function
addModuleImportToRootModule
in the following way:As result, I get an invalid import statement in my app.module.ts. The module will be added correctly to the NgModule, but create an invalid import statement:
Is there a way to to solve this problem?
Thanks!