question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simple Docs for angular cli command | Routing

See original GitHub issue

πŸ“š Docs or angular.io bug report

✍️Description

Hi All,

The documentation for creating feature module with routing here with routing needs to be more simplified.

πŸ”¬ Minimal Reproduction

image

As per above description the command auto generates following files

  1. CustomersModule
  2. CustomersComponent.

Where as the command ng generate module customers --route customers --module app.module creates following files.

  1. CustomersModule
  2. CustomersComponent
  3. CustomersRoutingModule

What’s the affected URL?**

✍️

Docs for creating feature module with routing here

Reproduction Steps**

N/A

Expected vs Actual Behavior**

The docs should be improved to clearly stating what is happening as follows.

ng generate module customers --route customers --module app.module.

Expected Behavior :-

The above command creates the following files.

  1. CustomersModule
  2. CustomersComponent
  3. CustomersRoutingModule

Once above files are created below configuration are auto-wired.

  1. The customers route, specified with the --route option, is added to the routes array inside the _app-routing.module.t_s file, using the lazy-loading syntax…
  2. The blank route is added to the routes array inside the customers-routing.module.ts file.

πŸ“·Screenshot

image

πŸ”₯ Exception or Error

N/A

🌍 Your Environment

N/A

✍️ Browser info

N/A

✍️ Anything else relevant?

N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kirjscommented, Feb 9, 2021

Seems like this issue can be closed after #38480

0reactions
angular-automatic-lock-bot[bot]commented, Mar 12, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI Overview and Command Reference - Angular
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command...
Read more >
Getting Started ✍️With Angular Routing Using Angular CLI
By using the command line parameter "--routing", we're able to create a routing module in the Angular application. So, by using any of...
Read more >
single-spa-angular
First, create an angular application. This requires installing Angular CLI. Note that the --prefix is important so that when you have multiple angularΒ ......
Read more >
Creating Angular Projects With Angular CLI - Medium
This file contains an empty default implementation of a Angular routing module. This module is also added to AppModule, so that you can...
Read more >
Getting Started With Angular Using the Angular CLI
The ng build command outputs these to the dist/my-first-angular-app folder to access the built files for deployment. You can use these files toΒ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found