我需要做那样的事情
$httpBackend.whenGET('http://url:port/whatever').passThrough();
直到现在,我使用的所有请求都是使用此模式
$httpBackend.whenGET('myroute/whatever.html').passThrough();
但是,我想我现在必须使用/ regex /开头的正则表达式,但我不知道如何抓住网址
任何帮助都会非常感谢,提前谢谢
答案 0 :(得分:0)
我相信你可以使用正则表达式或函数:
试试这个:
$httpBackend.when("GET", /\/(.*)/)
或
$httpBackend.when("GET", function(url) {
return true
})