how to get params in angular from url code example
Example 1: angular get url params
import { ActivatedRoute } from "@angular/router";
//import ActivatedRoute in constructor()
private $route: ActivatedRoute
// in ngOnInit() call
//myvar is the variable where you want to store your param
this.$route.params.forEach(param =>
this.myvar = param['whatever your param name is']
);
Example 2: in angular how to get router url without query params
this.router.url.split('?')[0]