0

I am trying to create a component using using the angular/cli & get the following error:

Error: Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule. Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule

1

1 Answer 1

1

That is because of new SPA templates. I had the same problem and solved it by installing "Angular files" extension for VS Code. It generates needed files from the context menu. Then you just need to add Component in app.module.shared.ts

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.