Issue
When I do an ng new some-app it generates an app.routes.ts in src/app/ but no app-routing.module.ts. I am a bit confused about the difference between these two files and their purpose. The Developer guide on Routing and Navigation mentions app.routes.ts where as the tutorial Tour of Heroes mentions app-routing.module.ts.
I am on Debian GNU/Linux 12 and my versions are:
node: 18.13.0
npm: 9.2.0
angular: 17.0.8
Any ideas or explanations for me? Thank you and Merry Christmas :)
Solution
Since Angular v17, the CLI generates standalone applications without any NgModules.
If you want to follow a routing tutorial for standalone please have a look at the new Angular.dev, which is the new official doc site.
Long story short, yes every route should go into your app.routes.ts !
Answered By - Matthieu Riegler
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.