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.

ng generate route <name> created scaffolds not working.

See original GitHub issue

I created the routes with angular cli, it created all the scaffolds and necessary references in the parent component :

@Routes([ {path: '/hero', component: HeroComponent} ])

Also added the router outlet tag in the parent component’s HTML template.Everything seems fine but still when i try to access that route,I see the parent template outputting but component whose template has to be resolved in the router outlet tag is not visible. Although when I tried to make the project folder with npm as guided in the official angular docs,route works fine.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
plansercommented, Jun 3, 2016

@UzairNouman try npm installing @angular/router-deprecated and adding the entry @angular/router-deprecated to Angular specific barrels in system-config.ts. It worked for me…

0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 2019

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

Generate a routing module while creating a module in angular ...
So basically, there's no separate command to create routing.module file. But, that can be created while on ... ng generate module [module-name] --routing....
Read more >
Create a feature component - Angular
Use this ng generate command to create a new component named hero-detail . ... The new HeroDetailComponent can present any hero, not just...
Read more >
Effective automated scaffolding with Angular Schematics
I presented a quite frequent problem, and solved it in a simple way by creating routines via schematics, that will modify your angular...
Read more >
How to Generate a Service Using the Angular CLI | Pluralsight
This command will create a new Angular application within your current directory named ... 1 ng generate service another --path=app/core.
Read more >
3 - Generating components and Nx lib - Angular and NgRx
nx generate @nrwl/angular:library [name] [options,...] Options: --name Library name ... CREATE libs/auth/src/lib/auth.module.spec.ts (339 bytes).
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