Angular Visual Studio Delete Nested Component

1223 views angular

I'm very new to Angular, coming from a Web Forms background. I Set up an Angular project in Visual Studio and going through tutorials. I'm trying to delete a component. I've removed all references to it in app.module.ts and app.component.ts and deleted the .js, .ts files for the component. When I run the project the console error states my deleted component is not a known element. How do you get rid of a component using Visual Studio? I also removed some html in the template and the browser still renders it.

answered question

1 Answer


and welcome to StackOverflow !

This happens because your app stills try to register your component in your module.

To fix that, open your app.module.ts, and remove all occurences of component you want to delete.

posted this

Have an answer?


Please login first before posting an answer.