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.

Can't initialize routing in Angular app using preset

See original GitHub issue

I ran these 2 commands:

  1. npx create-nx-workspace@latest and chose Angular and Scss…
  2. ng generate @nrwl/angular:library lazy-lib --lazy --parentModule=apps/nx-app/src/app/app.module.ts --routing --style=scss --tags=views

I received no errors about routing, but no lazy/routing stuff was set up. The angular app that was created does not have routing at all, so I would expect an error

Expected Behavior

Minimally, I would expect an error to be reported that the routing/lazy flags cannot be honored. Optimally, I would like it to add routing configuration (or be given a way to do that with the schematics in create-nx-workspace)

Current Behavior

It silently fails and I don’t have lazy loading or routing set up

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
brandonrobertscommented, Jan 6, 2020

Just to follow-up here, I’m working on an feature to add interactive mode to create-nx-workspace, so if you use --interactive=true it will show you the prompts from the underlying schematics.

https://github.com/nrwl/nx/pull/2258

0reactions
vsavkincommented, Jan 26, 2020

Fixed here: https://github.com/nrwl/nx/pull/2258

It’s going to be release in 8.12 next week. Simply pass --interactive=true when creating a workspace and you will be able to select all the options.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to initialize the route param when I open the app ...
I am new to angualr 7 , I am trying to build a dashboard for users and users will get url for their...
Read more >
Using Angular routes in a single-page application
Using Angular routes in a single-page applicationlink ; Define your routeslink · From your code editor, open the app.module.ts file. · Replace the...
Read more >
How to Add Routing to an Existing Angular Project - Sam Julien
When we first create an Angular app with the Angular CLI using ng new , it gives us an option to add routing....
Read more >
Working with Angular 14 Router - Techiediaries
Route guards enables you to allow or disallow access to your specific application routes based on some criteria (for example if the user...
Read more >
Angular | IntelliJ IDEA Documentation - JetBrains
The recommended way to start a new Angular application is Angular CLI. Only in this case your application is bootstrapped with ...
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