Can't initialize routing in Angular app using preset
See original GitHub issueI ran these 2 commands:
npx create-nx-workspace@latest
and chose Angular and Scss…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:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
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!