showing results for - "change route on button click angular"
Mirko
03 Mar 2017
1<button type="button" class="btn btn-primary-outline pull-right" (click)="btnClick();"><i class="fa fa-plus"></i> Add</button>    
2
3// myComponent.component.ts file 
4import { Router } from '@angular/router';
5
6constructor(private router: Router) {
7
8}
9// myComponent.component.thml
10btnClick= function () {
11        this.router.navigateByUrl('/user');
12};
13
Max
12 Nov 2019
1<a routerLink="/">Go To Home</a>
2
Tristan
01 Nov 2020
1<a routerLink="/">Go to home</a>
queries leading to this page
angular on click navigatenavigate to another page in angularrouter link with button in angularangular click go to routenavigation to next component in button click angularangular link buttonnavigate to url on click angularangular method button click router linkangular buttton linkclick to navigate angularrouter on click angular 3cbutton 5brouterlink 5d 3d 22 5b 27search 27 5d 22 3eadd 3c 2fbutton 3eangular button linkhtml buttn routeangular navigate to component on clickangular routing buttonclick and vaigate angu 3barangular routing on button clickbutton routerlink angular 8angular button change urlnavigate from component angular 6how to add routing to a button in angularnavigate to another componetin angular on click buttonrouterlink for button in angular 7angular redirect buttonangular routing with button clickhow to use routerlink on button in ionic angularangular navigate to another pagerouting clicking on a link angularchange route on button click angularangular button route to componentbutton to navigate from one page to another angular 8button routerlink angular 9angular navigate to another page on button clickangular link to another pageangular onclick go to urlhow to add function buttons move next component in angularrouter link button angularbutton click routing in angularroute using button in angualrrouting navigate to another page in button click angular 4 stackoverflowangular button with nav linkangular button navigate to routeclick navigate to angularlink to another page angularangular onclick buton route to dashboardangular button click routerlinkangular button routingput routing in buttonangular router buttonangular funnction that navigates to new pageangular using routerlink with buttonroute using button in angularon click route to a component angularonclick route to another component angularangular button for routingrouterlink on buttonangular button navigateangular button add routerchange route on button click angular