课程: Angular Essential Training

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Defining routes for Angular Router

Defining routes for Angular Router - Angular教程

课程: Angular Essential Training

Defining routes for Angular Router

- [Instructor] The Angular framework has full support for everything you might need when navigating between pages in your app. Some projects are small enough that they don't need page routing, but it's a good idea for all Angular developers to know how routing works. I opened our project here in a GitHub codespace. I talked about why we use codespaces earlier in this course, so for now, just think of them as an easy way to share and write code without installing anything on your local machine. I'll go to the source folder, open the app folder and click on app routing dot module dot TS to open the file. Angular Router is the official package for managing routes in Angular apps. It's an optional package that you add to your project as needed using the Angular CLI tool. There are two parts to using Angular Router in your app. The first part is defining your routes and bootstrapping the Router service. And the second part is…

内容