How can I get the value of param2 based on name in angular?
http://localhost:4200/home#parma1=value1¶m2=value2¶m3=value3
Tried Below:
constructor(
private router: Router,
private route: ActivatedRoute) { }
ngOnInit(): void {
this.route.queryParams
.subscribe(params => {
console.log(params); // Out put : {}
}
);
console.log(this.router.url); // Output : /home#parma1=value1¶m2=value2¶m3=value3
}
Is there any standard approach to get the parameters when parameters separated with #
instead of ?
?