I am using ng-strict-di mode in my angular app. It throws an error
throbberController is not using explicit annotation and cannot be invoked in strict mode
my code is:
app.directive('throbberDirective',
[
'_$ajax',
function(_$ajax){
return {
restrict: "EA",
templateUrl: "common/utils/throbbers/throbber.html",
controller: throbberController
}
function throbberController($scope){
$scope.throbber = _$ajax.getThrobberConfigs();
$scope.throbber.templateName = $scope.throbber.templateName;
}
throbberController.$inject = ['$scope'];
}
]);
How to inject explicitly? Am I doing anything wrong? Help me solve this.