无法使HttpInterceptors工作

时间:2014-05-07 09:35:55

标签: dependency-injection dart angular-dart

我可能遗漏了一些愚蠢的东西,但我无法让HttpInterceptor工作。基于几个示例(x x x)和API参考,我编写了这个代码,当新页面被路由到时,它似乎没有做任何事情。< / p>

Injector inj = applicationFactory().addModule(new MyClient()).run();
RequestInterceptor intercept = (HttpResponseConfig res) => print("TEST");
inj.get(HttpInterceptors).add(
    new HttpInterceptor()..request = intercept
);

0 个答案:

没有答案