angular how to get params from url 3 level code example
Example 1: angular get url param
constructor(private activatedRoute: ActivatedRoute) {
this.activatedRoute.queryParams.subscribe(params => {
let date = params['startdate'];
console.log(date); // Print the parameter to the console.
});
}
Example 2: in angular how to get router url without query params
this.router.url.split('?')[0]