这就是我正在做的事情,包括beforeEach(module('myApp'));
根据我的知识使用的整个应用程序,它必须加载所有模块(如控制器、服务等),并且通过编写下面的代码,我应该能够注入服务preloadedData
,但有些我得到了异常Error: [$injector:unpr] Unknown provider: preloadedDataProvider <- preloadedData
beforeEach(inject(function ($controller, $httpBackend, $rootScope, $window, $location, preloadedData) {
scope = $rootScope.$new();
location = $location;
routeParams = $routeParams;
httpBackend = $httpBackend;
myController= $controller('myController', {
$scope: scope,
$location: location,
preloadedData: preloadedData
});
}));
谁能帮我解决这个问题.. !!?