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
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}