get page link angular
import { Component } from '@angular/core';
import { Router } from '@angular/router';
@Component({
template: 'The href is: {{href}}'
/* Other component settings */
})
export class Component {
public href: string = "";
constructor(private router: Router) {}
ngOnInit() {
this.href = this.router.url;
console.log(this.router.url);
}
}
Also in JavaScript:
- fetch json file
- calling function from function object javascript
- how to make a vertical array js
- nodejs fs delete non empty directory
- Sum of all the multiples of 3 or 5
- javascript get referrer
- ajax django send array
- hide checkbox jquery
- export multiple functions react
- redirect to homepage javascript
- disable input jquery
- count the number of spacesinto a string javascript
- get unique id angular
- discord.js reply to message
- tolocalestring javascript currency fixing 2 decimal places
- scoll a div to bottom in angular
- javascript string search case insensitive
- javascript map function
- react check if localhost
- clear input jqueyr
- node js post multipart/form-data
- showing difference between dates in minutes js
- react google maps get map center
- change color by java scribt