我从第三方网站获取此网址重定向 http://localhost:4200/account/congratulations%3FdocumentId%3Dnnn
但我需要解码为 http://localhost:4200/account/congratulations?documentId=nnn
用于渲染我的页面 “%3F”=“?” “%3D”=“=” 我需要在项目中的哪里对其进行解码?
最佳答案
您可以使用decodeURIComponent
示例:
decodeURIComponent("%3d")
关于angular - 如何在 Angular 7中将%3F解码为 '?'和%3D解码为 '='?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56608693/