1234567891011121314151617181920212223242526272829303132333435 |
- angular.module('app')
- .controller('articleCategoryController', ['$scope', '$stateParams', 'articlesBusiness', 'AppUtilsBusiness', 'luBusyBusiness',
- function($scope, $stateParams, articlesBusiness, AppUtilsBusiness, luBusyBusiness) {
-
- $scope.busy = luBusyBusiness.reset();
- $scope.items = null;
- $scope.appUtils = AppUtilsBusiness;
- $scope.itemType = $stateParams.type;
-
- $scope.query = {
- order: 'id',
- filter: '',
- limit: 10,
- page: 1
- };
-
- $scope.resetFilter = function()
- {
- if ($scope.query.filter != '') {
- $scope.query.filter = '';
- $scope.load();
- }
- };
-
- $scope.load = function()
- {
- articlesBusiness.getMultiple($scope.query.order, 'type: ' + $scope.itemType + ' ' + $scope.query.filter,
- $scope.query.page - 1, $scope.query.limit, 'articleCategory.articleCategory').then(function(data)
- {
- $scope.items = data;
- }, function (error) {});
- };
-
- $scope.load();
- }]);
|