Using Anular CLI, how do you create a new feature module that will be automatically imported to your main app module?
Experience Level:
Junior
Tags:
Angular
Angular CLI
Answer
A feature module can be created by running the following command from the command line:
ng generate module name-of-your-module --module app
By executing the above commnd you are telling Angular CLI to create a module name-of-your-module and to include it in the application module app.
- The feature module will be created in its own folder src/app/name-of-your-module/feature-module.cs
- The app module file src/app/app.module.ts will be modified as the feature module will be imported into it
Related Angular CLI job interview questions
-
Using Anular CLI, how do you create a new component that will be automatically imported to your feature module that is called feature-module1?
Angular Angular CLI Junior -
Using Anular CLI, how do you create a new component that will be automatically imported to your main app module?
Angular Angular CLI Junior -
How do you create new application using Angular CLI?
Angular Angular CLI Junior -
What do you need to do in order to be able to run Angular CLI on your computer?
Angular Angular CLI Junior -
What is linting and how do you run linting for your Angular application unsing Angular CLI?
Angular Angular CLI Junior