내가 요소의 목록을 표시 ngTable (AngularJS와)를 사용하고 있지만, 컴파일 할 때 오류가 발생하는 :오류 ngTable AngularJS와
************ I am OK ******************
articles.client.controller.js를 : 12 ReferenceError가가 : 기사입니다 (...../modules/articles/controllers articles.client.controller.js : 27 : 16)
이것은 내 코드 : myApp/public/modules/articles/controllers 기사입니다. client.controller.js
'use strict';
angular.module('articles').controller('ArticlesController', ['$scope', '$stateParams', '$location',
'Authentication', 'Articles',
function($scope, $filter, ngTableParams, $stateParams, $location, Authentication, Articles){
$scope.authentication = Authentication;
$scope.find = function() {
$scope.articles = Articles.query();
};
console.log('************ I am OK ******************');
/* jshint ignore:start */
$scope.tableParams = new ngTableParams({
page: 1, // show first page
count: 10, // count per page
filter: {
title: '' // initial filter
},
sorting: {
title: 'asc' // initial sorting
}
}, {
total: articles.length, // length of data
getData: function($defer, params) {
// use build-in angular filter
var filteredData = params.filter() ?
$filter('filter')(articles, params.filter()) :
articles;
var orderedData = params.sorting() ?
$filter('orderBy')(filteredData, params.orderBy()) :
articles;
params.total(orderedData.length); // set total for recalc pagination
$defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
}
});
/* jshint ignore:end */
$scope.create = function() {
var article = new Articles({
title: this.title,
content: this.content
});
article.$save(function(response) {
$location.path('articles/' + response._id);
}, function(errorResponse) {
$scope.error = errorResponse.data.message;
});
this.title = '';
this.content = '';
};
$scope.remove = function(article) {
if (article) {
article.$remove();
for (var i in $scope.articles) {
if ($scope.articles[i] === article) {
$scope.articles.splice(i, 1);
}
}
} else {
$scope.article.$remove(function() {
$location.path('articles');
});
}
};
$scope.update = function() {
var article = $scope.article;
article.$update(function() {
$location.path('articles/' + article._id);
}, function(errorResponse) {
$scope.error = errorResponse.data.message;
});
};
}
]);
도움을 주셔서 감사합니다. 인터프리터가 당신에게 어디에 그것은 당신의 문제처럼 보인다