It is rather easy to read out query parameters like ?id=2030 from a URL with Angular router. Here is the snippet

import {Component, OnDestroy} from '@angular/core';
import {ActivatedRoute} from "@angular/router";

  selector: 'app-home',
  templateUrl: ''
export class testPage {

  public Id: string;

    private activatedRoute: ActivatedRoute
  ) {
    this.woId = this.activatedRoute.snapshot.queryParams['Id'];


Now in my my Id is available

{{ Id }}


Saved you some valuable time?

Donate and get more free time-saving code on this website in the future.