Browse Source

压缩过程会把参数名压缩(a\b\c)依赖注入失效,必须用中括号声明要注入的名称

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@1199 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 10 years ago
parent
commit
c20daab55a

+ 6 - 6
src/main/webapp/resources/js/serve/app.js

@@ -74,9 +74,9 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
 			});
 		};
 	}]);
-	app.controller('IndexCtrl', function($scope){
+	app.controller('IndexCtrl', ['$scope', function($scope){
 		
-	});
+	}]);
 	app.controller('ContactCtrl', ['$scope', 'toaster', function($scope, toaster){
 		$scope.connect = function(type) {
 			toaster.pop('warning', '连接失败', '高峰期建议选择自助服务或问题反馈');
@@ -87,7 +87,7 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
 			$scope.slides = data;
 		});
 	}]);
-	app.controller('ForgetPwd1Ctrl', function($scope, toaster, Password){
+	app.controller('ForgetPwd1Ctrl', ['$scope', 'toaster', 'Password', function($scope, toaster, Password){
 		$scope.loading = false;
 		$scope.getUserInfo = function(){
 			$scope.loading = true;
@@ -124,8 +124,8 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
 			});
 		};
 		
-	});
-	app.controller('ForgetPwd2Ctrl', function($scope, toaster, $stateParams, Password){
+	}]);
+	app.controller('ForgetPwd2Ctrl', ['$scope', 'toaster', '$stateParams', 'Password', function($scope, toaster, $stateParams, Password){
 		$scope.uu = $stateParams.uu;
 		$scope.checkcode = $stateParams.checkcode;
 		$scope.checking = true;
@@ -161,7 +161,7 @@ define([ 'toaster', 'ngTable', 'common/services', 'ui.router', 'ui.bootstrap', '
 			});
 		};
 		
-	});
+	}]);
 	/**
 	 * 搜索框,回车触发
 	 */

+ 3 - 3
src/main/webapp/resources/js/serve/services/Serve.js

@@ -13,7 +13,7 @@ define([ 'angular' ], function() {
 				return defer.promise;
 			}
 		};
-	}]).factory('Question', function($http, $q) {
+	}]).factory('Question', ['$http', '$q', function($http, $q) {
 		return {
 			get : function(id) {
 				var defer = $q.defer();
@@ -27,7 +27,7 @@ define([ 'angular' ], function() {
 				return defer.promise;
 			}
 		};
-	}).factory('Password', function($http, $q) {
+	}]).factory('Password', ['$http', '$q', function($http, $q) {
 		return {
 			getUserInfo : function(userName) {
 				var defer = $q.defer();
@@ -75,5 +75,5 @@ define([ 'angular' ], function() {
 				return defer.promise;
 			}
 		};
-	});
+	}]);
 });