pass params to url angular code example
Example 1: angular url parameter
// example url: details?id=2
constructor(private activatedRoute: ActivatedRoute) {
this.activatedRoute.queryParams.subscribe(params => {
console.log(params); // Prints {id: "2"}
});
}
Example 2: angular pass params
this._Activatedroute.paramMap.subscribe(params => {
this.id = params.get('id');
});