What command would you use to generate a new module and its associated routing in a single command using Angular CLI?
- ng create module my-module --routing
- ng generate module my-module --routing
- ng module generate my-module --with-routing
- ng new my-app --module my-module
To generate a new module with its associated routing in a single command using Angular CLI, you should use the ng generate module my-module --routing command. This command creates a new module and sets up its routing configuration simultaneously, which is a common practice in Angular applications.
Loading...
Related Quiz
- Which lifecycle hook is called once when the component is initialized?
- Which method of ViewContainerRef allows you to insert a component?
- You have been tasked with improving the initial load time of an Angular application. Which of the following techniques would be most effective?
- What method of HttpClient would you use to send a GET request?
- What is the primary purpose of the ng serve command in the Angular CLI?