filmov
tv
Angular routing and navigation
Показать описание
In this video we will discuss setting up routing in our sample application.
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
The routing techniques discussed in this video can be used with Angular 2 and later versions. The same techniques will also work in Angular 4 and Angular 5.
Here are the steps in short
2. Import the RouterModule into the application root module AppModule. The Router Module contains the Router service and Router directives such as (RouterLink, RouterLinkActive, RouterOutlet etc). So for us to be able to implement routing, we first need to import the Router Module in our AppModule.
const appRoutes: Routes = [
{ path: 'list', component: ListEmployeesComponent },
{ path: 'create', component: CreateEmployeeComponent },
{ path: '', redirectTo: '/list', pathMatch: 'full' }
];
To let the router know about the routes configured above, pass "appRoutes" constant to forRoot(appRoutes) method We also have forChild() method. We will discuss the difference and when to use one over the other in our upcoming videos
We are using Bootstrap navbar component to create the navigation menu. We discussed Bootstrap navbar component in Part 28 of Bootstrap tutorial. The following is the link.
Text version of the video
Slides
Angular CRUD Tutorial
Angular CRUD Tutorial Text Articles & Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
The routing techniques discussed in this video can be used with Angular 2 and later versions. The same techniques will also work in Angular 4 and Angular 5.
Here are the steps in short
2. Import the RouterModule into the application root module AppModule. The Router Module contains the Router service and Router directives such as (RouterLink, RouterLinkActive, RouterOutlet etc). So for us to be able to implement routing, we first need to import the Router Module in our AppModule.
const appRoutes: Routes = [
{ path: 'list', component: ListEmployeesComponent },
{ path: 'create', component: CreateEmployeeComponent },
{ path: '', redirectTo: '/list', pathMatch: 'full' }
];
To let the router know about the routes configured above, pass "appRoutes" constant to forRoot(appRoutes) method We also have forChild() method. We will discuss the difference and when to use one over the other in our upcoming videos
We are using Bootstrap navbar component to create the navigation menu. We discussed Bootstrap navbar component in Part 28 of Bootstrap tutorial. The following is the link.
Text version of the video
Slides
Angular CRUD Tutorial
Angular CRUD Tutorial Text Articles & Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
Комментарии