Horje
how click button and redirect angular Code Example
how click button and redirect angular
<a rel="nofollow" class="btn" routerLink="/votes">Check votes</a>
how click button and redirect angular
import { Component } from '@angular/core';
import { Router } from '@angular/router';
// component details here...
export class MyComponent  {
  constructor(private router: Router){ }

  goToVotes($myParam: string = ''): void {
    const navigationDetails: string[] = ['/votes'];
    if($myParam.length) {
      navigationDetails.push($myParam);
    }
    this.router.navigate(navigationDetails);
  }
}
how click button and redirect angular
<button class="btn" (click)="goToVotes()">Check votes</button>




Javascript

Related
how do i make a link to direct me to a new page when i click on a button in react Code Example how do i make a link to direct me to a new page when i click on a button in react Code Example
get class of object javascript Code Example get class of object javascript Code Example
Cannot assign to read only property 'value' of object '[object Object] js Code Example Cannot assign to read only property 'value' of object '[object Object] js Code Example
javascript rect Code Example javascript rect Code Example
Cannot assign to read only property 'value' of object '[object Object] Code Example Cannot assign to read only property 'value' of object '[object Object] Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7