-2

I need to get this token that is in the url, to send to db later

mysite.com/changePassword?token=45456112241121131154

Thanks for any help

  • if it's any url that you want to parse, have a look here https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript If you want to parse current URL in a angular component/service, you can use angular's router – David Feb 09 '18 at 18:40
  • I wanted a way with the angular even so I created this topic – Giovanni Dias Feb 09 '18 at 18:46
  • https://stackoverflow.com/questions/44331189/passing-params-angular-2-traditional-way/44331724#44331724 – DeborahK Feb 09 '18 at 19:52

1 Answers1

1

Can you check with Activated route

constructor(private route: ActivatedRoute) { }

ngOnInit() { 

  console.log(this.route.snapshot.queryParams["token"]); 

}
DeborahK
  • 57,520
  • 12
  • 104
  • 129
shajan
  • 610
  • 6
  • 11