Angular-cli: "ng d component <component name>" is not deleting the component reference from app.module.ts and the component folder

Created on 20 Aug 2016  路  6Comments  路  Source: angular/angular-cli

  1. OS
    Linux -Ubuntu 16.04
  2. Versions.
    angular-cli : 1.0.0-beta.11-webpack.2
    node : 6.4.0
    os : linux x64
  3. Deleting component using ng d component <component_name> is not deleting component reference from app.module.ts and the folder which containing the deleted component.
    selection_003
    selection_004

Most helpful comment

@usama520 you delete the fine manually, and delete all references to it.

All 6 comments

We don't support destroying generated files. This will be removed from ng help in https://github.com/angular/angular-cli/issues/1807.

@filipesilva Please tell how to delete a component.

@usama520 you delete the fine manually, and delete all references to it.

That's not very useful. Either the ng cli should support developing components by adding in the creation and deletion of them, or it should not. But just doing half a job seems pointless, it serves only to demonstrate how it would be useful to have such a tool, and then leaves the user to have to write the tool themselves.

Why does Angular support generating a component from the CLI, but not deleting one?

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings