0
http://plnkr.co/edit/AmuC4CpfMnP9ySmOI54C?p=preview模块服务不可用注射服务
var app = angular.module('plunker', ['extraService']);
app.controller('MainCtrl', ['$scope', '$http', 'extraService', function ($scope,$http,extraService) {
$scope.name = 'World';
}]);
app.service('extraService',function(){
return 'abc';
});
这有什么错我的服务注入?为什么我会得到模块服务extaService不可用错误?
它的工作,但为什么当我CONSOLE.LOG(extraService)我”当你不需要注入服务
extraService
m看到一个空的对象而不是abc? –