I have set up the following routing system
export const MyRoutes: Routes = [
{path: \'\', redirectTo
Use ActivatedRouteSnapshot from your ActivatedRoute
ActivatedRouteSnapshot
interface has params
and queryParams
property, and you could get the both value at the same time.
constructor(private route: ActivatedRoute) {
console.log(this.route.snapshot.params);
console.log(this.route.snapshot.queryParams);
}
Edit : As OP stated, we only get the initial value of the parameters with this technique.
Example Plunker