filmov
tv
Angular router navigate method

Показать описание
Text version of the video
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.
Slides
Angular 2 Tutorial playlist
Angular 2 Text articles and slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
In this video we will discuss the use of Angular Router service navigate() method. This method is useful when you want to navigate to another page programmatically.
Let us understand this with an example. Here is what we want to do. On the EmployeeComponent that displays specific employee details, we want to include a Button. When we click the button we want to redirect the user to EmployeeListComponent.
[div style="margin-top:5px"]
[input type="button" class="btn btn-primary" value="Back to Employees List"
(click)="onBackButtonClick()" /]
[/div]
Specify a dependency on the Router service using the EmployeeComponent class constructor. The angular injector will automatically inject an instance of the Router service when an instance of EmployeeComponent is created.
constructor(private _router: Router) {
}
onBackButtonClick() :void {
}
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.
Slides
Angular 2 Tutorial playlist
Angular 2 Text articles and slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
In this video we will discuss the use of Angular Router service navigate() method. This method is useful when you want to navigate to another page programmatically.
Let us understand this with an example. Here is what we want to do. On the EmployeeComponent that displays specific employee details, we want to include a Button. When we click the button we want to redirect the user to EmployeeListComponent.
[div style="margin-top:5px"]
[input type="button" class="btn btn-primary" value="Back to Employees List"
(click)="onBackButtonClick()" /]
[/div]
Specify a dependency on the Router service using the EmployeeComponent class constructor. The angular injector will automatically inject an instance of the Router service when an instance of EmployeeComponent is created.
constructor(private _router: Router) {
}
onBackButtonClick() :void {
}
Комментарии