Answers for "angular get current page html content"

2

how to get ram detail in linux

sudo dmidecode --type 17
Posted by: Guest on October-13-2020
37

get current url js

var currentUrl = window.location.href;
Posted by: Guest on July-22-2019
1

get current url 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);
    }
}
Posted by: Guest on July-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language