how click button and redirect angular
<a class="btn" routerLink="/votes">Check votes</a>
<button class="btn" (click)="goToVotes()">Check votes</button>
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);
}
}
Also in JavaScript:
- react native function
- jquery count selected options
- observable tutorial angular
- jquery add attribute
- enable emmet vscode react
- append to array js
- install expo cli mac os
- Make a program that filters a list of strings and returns a list with only your friends name in it.javascript
- javascript limit input to 2 decimal places
- how to change grid size with conditional expression in react
- How to copy text from a div to clipboard
- react axios post method
- javascript null check
- make forn awesome icon clickable in react
- set in Dynamo DB not properly incrementing nodejs lamnda function
- dynamic vue js maintenance mode
- search inside a string javascript
- jest timeout
- javascript event loop
- javascript change image src
- print to console without newline nodejs
- line separator with text in the center react native
- animejs
- exit popup javascript