Reputation: 2424
I have a value that I pass on to URL parameter the original value looks like this:
1436641259169/nDfmDmVa
when it gets passed on it converts it to this:
1436641259169%252FnDfmDmVa
So, how to do I convert it back when I pull it down?
Upvotes: 8
Views: 25936
Reputation: 321
I think this will help you to decode the url :
decode(content: string){
return decodeURIComponent(content);
}
Upvotes: 0
Reputation: 94299
This may help you: decodeURIComponent
decodeURIComponent(string);
Example:
decodeURIComponent(decodeURIComponent("1436641259169%252FnDfmDmVa"))
> "1436641259169/nDfmDmVa"
Upvotes: 14