Answers for "angular redirect to url with parameters"

5

angular [routerlink]

content_copy
      
      <a [routerLink]="['/user/bob']" [queryParams]="{debug: true}" fragment="education">
  link to user component
</a>
Posted by: Guest on March-06-2020
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']
);
Posted by: Guest on March-19-2020

Code answers related to "angular redirect to url with parameters"

Code answers related to "Javascript"

Browse Popular Code Answers by Language