There is a reason you need to inject services and a controller into an array of strings.
if you want to enter the control area of the controller, you must use
angular.module('yourApp')
.controller('yourController',['$scope',function($scope){
}]);
Minification , ,
angular.module('yourApp')
.controller('yourController',function(e){
});
, angular , "e", , .
, .
.directive('mhDashboard', ['$http','authService','apiService', function ($http, authService, apiService) {
return {
restrict: 'EA',
scope: {
name: '@',
dash: '@',
report: '@',
disname: '@',
disdesc: '@',
distot: '@'
},
templateUrl: 'views/dashboard/dashboard-direc.html',
link: function (scope, element, attr) {
scope.linkChk = scope.name;
switch (scope.linkChk) {
case 'Shipped This Week':
scope.url = 'erp/JobShipmentList/PostCpsVwShipmentCount';
scope.shipstatus = "Departure";
scope.period = "ThisWeek";
scope.basicfilter = "Open";
scope.linkName = "Shipments";
scope.linkDesc = "Shipped This Week";
break;
}
}])