routerlink for button in angular 7
<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');
};
<a routerLink="/">Go To Home</a>
Also in JavaScript:
- react native passing parameters to routes
- node js module require multiple functions from one node
- react cheat sheet
- javascript Convert an array of objects to a single object
- js check if undefined
- js create object url base64 pdf binary
- convert javascript date into excel date
- arrow keys function javascript
- javascript Inserting values in between an array
- pass variable to regrex literal notation javascript
- javascript convert to boolean
- react sagas state
- js propagation stop
- react suspense chunck
- javascript random integer
- js obj getting count of properties
- js array to json
- how store array in another array js
- iis express gzip
- webview javascript enabled
- angular material input
- stop a setinterval
- ajax call to load a page on scrolling
- undo npm run eject react