0

I have set the Routes as below in app-routing.module.ts

{ path: 'token/:token', component: AppComponent }

The destination URL is

localhost:4200/token/23s893rhjkdsdfhjk234=

But when I enter this url into browser and get the final url is

localhost:4200/token/23s893rhjkdsdfhjk234 

the '=' is missing,
could I know why the '=' is ignored and how to keep it in url?
Thanks

JinWu
  • 96
  • 1
  • 7

1 Answers1

1

The solution to my answer based on ngShravil.py's link is that encode the token part of the URL which is 23s893rhjkdsdfhjk234= here by using encodeURIComponent, and decode it when route received it by using decodeURIComponent.

JinWu
  • 96
  • 1
  • 7