add a route to a buttoin in angular
<button type="button" class="btn btn-primary-outline pull-right" (click)="btnClick();"><i class="fa fa-plus"></i> Add</button>
// myComponent.component.ts file
import { Router } from '@angular/router';
constructor(private router: Router) {
}
// myComponent.component.thml
btnClick= function () {
this.router.navigateByUrl('/user');
};
Also in JavaScript:
- react documentation
- js test if array
- react cheat sheets
- abstraction in javascript
- redirect browser javascript
- not operator js
- how to compare strings in javascript ignoring case sensitive
- react merge two objects
- how to split two digit number in javascript
- escaped json to json javascript
- how to get url node
- javascript dynamic arrays
- moment js check if date is greater than
- eslint ignore file rule
- i18n react meta description
- fs.writeFileSync in pdfDocument
- chart js radar grid color
- how to compare a string with its ending in javascript
- moment js
- How do you detect whether or not a word is a palindrome in javascript
- anonymous function js
- beautify json python
- javascript canvas gamma correction
- scale text in div react