Closed Sch8i closed 4 years ago
Same issue with me. After seleting "Generate Component" my broken app.module.ts looks like this (see RouterMoudule Entry):
(....) ], imports: [ BrowserModule, HttpClientModule, FormsModule, RouterModule.forRoot([\npath ], providers: [ RestockListService, SearchService ], bootstrap: [ AppComponent ] (...)
I've had same issue for a while. It breaks app.module by adding import to invalid place. If app.module is not open, it is not undoable, but if you keep file open in VS code, you undo changes.
This is annoying problem, which should be fixed if this project is still alive.
It mangles my app.module providers section when I have an object-like entry such as { provide: HTTP_INTERCEPTORS, etc}
, in it
That gets replaced with just provide:
which kicks off errors
When I call "generate component" about a right-click on a folder, the file app.module.ts will modify incorrectly.
I have made a test in different versions. I have installed version 1.4.0 and newer. As I installed version 1.6.1 I recognized, that the app.module.ts will modify incorrectly. In version 1.6.2 you can find the same behavior.