rename-angular-component icon indicating copy to clipboard operation
rename-angular-component copied to clipboard

Rename of standalone component fails with app.module

Open leomayer opened this issue 1 year ago • 1 comments

Describe the bug I rename a standalone component which is enlisted in the app.module in the imports: [.

Expected behavior Rename of the enlisted component in the imports: [ list. Currently the name remains the same.

leomayer avatar Apr 15 '24 14:04 leomayer

Hello @leomayer

I've created a module based app and then added a standalone component as you describe, and then used the extension to rename it. All was successful, as I was confident it would be.

This extension is very mature, and would be unlikely to fail in the scenario you describe. However, if there is something unusual about your project, app-module or standalone component - i.e. you have altered the class / filename so that they don't match the pattern generated by the Angular CLI, you could run into difficulties.

Are you prepared to share access to your repo? Or could you create a cut-down copy that still fails so I can look at it? The other thing you could do, is enable debug log to file: renameAngularComponent.debugLog, and then attach the output to this thread.

If your files are created by the Angular CLI and you don't alter their names manually, the extension will reliably find all imports and references to your components, directives, services, and modules.

tomwhite007 avatar Apr 21 '24 20:04 tomwhite007