Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

nevigate on button click 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');
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: Converting google document to pdf using Scrips 
Javascript :: dinamically add checked to checkbox 
Javascript :: antd tag 
Javascript :: javascript mysql query 
Javascript :: unix to time in javascript 
Javascript :: dm message collector discordjs 
Javascript :: export component react 
Javascript :: isChecked radio button jQuery 
Javascript :: access mouse position javascript 
Javascript :: how to write a javascript function 
Javascript :: nodejs process code 
Javascript :: Key Type 
Javascript :: forceupdate usereducer 
Javascript :: anagram 
Javascript :: use font awsome in react 
Javascript :: deploy react to aws 
Javascript :: how assign custom date to input type date in javascript 
Javascript :: call multiple functions onclick react 
Javascript :: js basic user class 
Javascript :: foreach in react 
Javascript :: moment not translating 
Javascript :: find all in array javascript 
Javascript :: ngif is string angular 
Javascript :: hello world program in javascript 
Javascript :: react native keyboard push view up 
Javascript :: switch to window in testcafe 
Javascript :: substring methods example 
Javascript :: js nuxt read/set cookie 
Javascript :: agregar atributo con id jquery 
Javascript :: Material-ui Accessible icon 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =