Changed the way Controllers are defined and DI
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
var ProductGroupListController = ['$scope', 'productGroups', function ($scope, productGroups) {
|
||||
angular
|
||||
.module('overlord')
|
||||
.controller('ProductGroupListController', ProductGroupListController);
|
||||
ProductGroupListController.$inject = ['$scope', 'productGroups'];
|
||||
function ProductGroupListController($scope, productGroups) {
|
||||
$scope.info = productGroups;
|
||||
}];
|
||||
}
|
||||
|
||||
ProductGroupListController.resolve = {
|
||||
productGroups: ['ProductGroup', function (ProductGroup) {
|
||||
@@ -10,7 +12,11 @@ ProductGroupListController.resolve = {
|
||||
}]
|
||||
};
|
||||
|
||||
var ProductGroupController = ['$scope', '$location', 'productGroup', function ($scope, $location, productGroup) {
|
||||
angular
|
||||
.module('overlord')
|
||||
.controller('ProductGroupController', ProductGroupController);
|
||||
ProductGroupController.$inject = ['$scope', '$location', 'productGroup'];
|
||||
function ProductGroupController($scope, $location, productGroup) {
|
||||
$scope.productGroup = productGroup;
|
||||
|
||||
$scope.save = function () {
|
||||
@@ -31,7 +37,7 @@ var ProductGroupController = ['$scope', '$location', 'productGroup', function ($
|
||||
});
|
||||
};
|
||||
$scope.foName = true;
|
||||
}];
|
||||
}
|
||||
|
||||
ProductGroupController.resolve = {
|
||||
productGroup: ['$route', 'ProductGroup', function ($route, ProductGroup) {
|
||||
|
||||
Reference in New Issue
Block a user