I created a service team-secret.service
using command n g s team-secret
But now I want to rename it team.service
using command.
Any help would be appreciated.
Use 'Rename Symbol' command With the cursor at the Component class, open Command Palette in VSCode with cmd+shift+p . Select “Rename Symbol” command and change the class name. VSCode will change the class name, and update all the references to this class in other files.
Use ng generate to create the MessageService in src/app .
Currently Angular CLI doesn't support the feature of renaming or refactoring code. You can achieve such functionality with help of some IDE's
You can use Microsoft Visual studio code to achieve this with the help of a plugin
More details can be found here
you can follow the same steps described here
How to rename a component in Angular CLI?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With