最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to decode URL parameter using AngularJS or JavaScript? - Stack Overflow

programmeradmin6浏览0评论

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?

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?

Share Improve this question edited Jul 18, 2015 at 6:57 teddybear123 asked Jul 18, 2015 at 6:47 teddybear123teddybear123 2,4246 gold badges25 silver badges40 bronze badges 0
Add a ment  | 

2 Answers 2

Reset to default 14

This may help you: decodeURIComponent

decodeURIComponent(string);

Example:

decodeURIComponent(decodeURIComponent("1436641259169%252FnDfmDmVa"))
> "1436641259169/nDfmDmVa"

I think this will help you to decode the url :

  decode(content: string){
    return decodeURIComponent(content);
  }
发布评论

评论列表(0)

  1. 暂无评论