阻止angular.js重写"+"到“%2B"在网址中 [英] stop angular.js from rewriting "+" to "%2B" in url
本文介绍了阻止angular.js重写"+"到“%2B"在网址中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Angular悄悄地重写了url,但是这种情况导致我的应用出现问题.如果我试图用角形修补这种特殊情况,我会去哪里看?
Angular quietly rewrites urls, but this specific case is causing problems for my app. Where would I look if I were trying to patch this particular case in angular?
它会破坏很多东西以迫使Angular表现这种方式吗?
Will it break a lot of stuff to force angular to behave this way?
推荐答案
我从上面的答案中找出了解决方法,我所要做的就是转到此行 https://github.com/angular/angular.js/blob/master/src/Angular.js#L873
I figured out the fix from the answer above, all I had to do was go to this line https://github.com/angular/angular.js/blob/master/src/Angular.js#L873
并添加
replace(/%2B/gi, '+').
到链.工作了请客!谢谢@fastreload !!!
to the chain. Worked a treat! Thanks @fastreload!!!
这篇关于阻止angular.js重写"+"到“%2B"在网址中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文