Answers for "get route query params angular"

0

in angular how to get router url without query params

this.router.url.split('?')[0]
Posted by: Guest on October-06-2020
-1

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']));
Posted by: Guest on July-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language