Ng Delete Service

[Solved] Ng Delete Service | Shell - Code Explorer | yomemimo.com
Question : ng delete service

Answered by : upset-unicorn-1mgdgrb72ugs

Remove import of Service from app.module.ts file if any
Remove service provider declaration from app.module.ts file if any
Remove references of Service from other files, to search the references, press "Ctrl+Shift + F" on Visual Studio Code and search for Service Name and remove all references from the search output.
Remove service.ts and service.spec.ts file of the service to be deleted from the App.
Save All Changes and then Run the "ng build" command, to check if it compiles and run properly after deletion of service

Source : | Last Update : Wed, 01 Jun 22

Answers related to ng delete service

Code Explorer Popular Question For Shell