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";
@Component({
selector: 'app-home',
templateUrl: 'test.page.html'
})
export class testPage {
public Id: string;
constructor(
private activatedRoute: ActivatedRoute
) {
this.getBooksData();
this.Id = this.activatedRoute.snapshot.queryParams['Id'];
}
}
Now in my test.page.html my Id is available
{{ Id }}