在指令链接函数中,我想调用工厂实例,是否可以
.directive('commentList', function(CommentsService, Global) { return { restrict: 'E', templateUrl: 'xxxx', link: function($scope, element, attrs) {
....我想从这里调用一个工厂 } }}); .factory('事实'){ }
在指令链接函数中,我想调用工厂实例,是否可以
.directive('commentList', function(CommentsService, Global) { return { restrict: 'E', templateUrl: 'xxxx', link: function($scope, element, attrs) {
....我想从这里调用一个工厂 } }}); .factory('事实'){ }