// example url: details?id=2 constructor(private activatedRoute: ActivatedRoute) { this.activatedRoute.queryParams.subscribe(params => { console.log(params); // Prints {id: "2"} }); }