angular get route without query params code example
Example 1: in angular how to get router url without query params
this.router.url.split('?')[0]
Example 2: get route query params angular
export class HeroComponent implements OnInit {
constructor(private _activatedRoute: ActivatedRoute, private _router:Router) {
_router.routerState.queryParams.subscribe(
params => console.log('queryParams', params['st']));