阅读背景:

模拟服务注入角模块运行块

来源:互联网 

In my module.run block it is calling a method on a service I have made. When running my tests I want it to reference a mock service instead of the real one which is making http requests. I am currently trying to test a controller, not the actual run block itself - how can I inject the mock service into the run function? I have tried using $provide.factory but it doesn't seem to do anything and is still loading the service as normal.In my module.run block it is calling a method o




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: