有没有更好的方法来处理编译器友好的angularjs控制器构造函数?
对于每个控制器,我的代码看起来都是这样......
return app.controller('WorkspaceCtrl', ['$rootScope', '$scope', '$route', 'DashboardModel', 'dashboards', 'reports', 'workspaces', '$modal', 'growl',
function WorkspaceCtrl($rootScope, $scope, $route, DashboardModel, dashboards, reports, workspaces, $modal, growl) {
//.. controller code here ...
}]);
谢谢!