get query params from url angular
import { ActivatedRoute } from '@angular/router';
export class ExampleComponent implements OnInit {
constructor(private router: ActivatedRoute) { }
ngOnInit() {
this.router.queryParams.subscribe(res=>{
console.log(res) //will give query params as an object
})
}
}