How to remove a generated route created using angular-cli

If I created a route that I would like to delete, is it enough to delete the created directory, the route path and the entry in system-config.ts?

+6
source share
3 answers

Based on the current version of the CLI, you will also need to remove the route definition from the parent component.

0
source

Answered January 31, 2017 after the changes were seen-

Currently angular-cli does not support kill commands. ng d component/whatever does not work since it was the remainder of ember-cli and does not remove the import and component / regardless of the declaration array.

It gives an error message The destroy command is not supported by Angular-CLI.

+6
source

You can remove a component from the terminal by typing

 ng d component "your_component" 

Maybe the same way you can delete your route

 ng d route "your_route_name" 

I have not tried deleting the route yet, but the removal of components has been deleted for me, maybe you can try :)

+3
source

All Articles