我需要做这样的事情
$httpBackend.whenGET('http://url:port/whatever').passThrough();
到目前为止,我使用的所有请求都采用这种模式
$httpBackend.whenGET('myroute/whatever.html').passThrough();
但是,我想我现在必须使用以/regex/开头的正则表达式,但我不知道如何赶上网址
任何帮助将不胜感激,提前感谢
我相信你可以使用正则表达式或函数:
试试这个:
$httpBackend.when("GET", //(.*)/)
或
$httpBackend.when("GET", function(url) {
return true
})