Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I remove a generated route created with angular-cli

Tags:

angular-cli

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

like image 500
DNRN Avatar asked Jun 10 '16 13:06

DNRN


2 Answers

Answered on 31.01.2017 after the changes have seen-

Currently angular-cli is not supporting destroy commands ng d component/whatever doesn't work Since it was a remnant from ember-cli functionality and doesn't remove the imports and component/whatever from the declarations array.

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

like image 134
Saiyaff Farouk Avatar answered Jan 02 '23 22:01

Saiyaff Farouk


You can Delete a component from terminal by typing

ng d component "your_component"

May be same way you can delete your route

ng d route "your_route_name" 

I didnt tried route deletion yet but component deletion works for me, may be you can try :)

like image 24
pd farhad Avatar answered Jan 02 '23 23:01

pd farhad