내 응용 프로그램에서이 pagination을 사용하려고합니다. 어떤 이유로, 내가 거기에 페이지 매김을 사용하려고하고있는 부분보기는AngularJS : 페이지 매김 명령문이 작동하지 않습니다.
<li dir-paginate></li> and <dir-pagination-controls></dir-pagination-controls>
내 생각 엔 내 각 응용 프로그램의 의존성 주입이 잘못이다 인식하지 못합니다.
var AngularSpringApp = angular.module('AngularSpringApp', ['angularUtils.directives.dirPagination']);
그리고 여기에 뷰와 관련된 내 컨트롤러 (KitController.js)입니다 (app.js) : 이것은 내 응용 프로그램 모듈입니다 응용 프로그램은이 마지막없이 노력하고 있습니다
var KitController = function ($scope, $http) {
$scope.kit = {};
$scope.fetchKitList = function() {
$http.get('kits/show').success(function (kitList) {
$scope.kits = kitList;
});
};
$scope.addKit = function (kit) {
$http.post('kits/add', kit).success(function() {
$scope.fetchKitList();
$scope.kit.owner = '';
$scope.kit.category = '';
});
};
$scope.resetKitForm = function() {
$scope.kit = {};
};
$scope.currentPage = 1;
$scope.pageSize = 10;
};
KitController.$inject = ['$scope', '$http'];
AngularSpringApp.controller('KitController', KitController);
라인뿐만 아니라. 그것은 다른 기능을 위해 일하는 것처럼 컨트롤러 괜찮아요.
Attr.specified is deprecated. Its value is always true. angular.js:3887
TypeError: undefined is not a function
at dirPaginationLinkFn (http://localhost:8084/app/resources/js/dirPagination.js:107:31)
at nodeLinkFn (http://localhost:8084/app/resources/js/lib/angular/angular.js:4240:13)
at compositeLinkFn (http://localhost:8084/app/resources/js/lib/angular/angular.js:3851:14)
at compositeLinkFn (http://localhost:8084/app/resources/js/lib/angular/angular.js:3854:12)
at compositeLinkFn (http://localhost:8084/app/resources/js/lib/angular/angular.js:3854:12)
at publicLinkFn (http://localhost:8084/app/resources/js/lib/angular/angular.js:3763:30)
at update (http://localhost:8084/app/resources/js/lib/angular/angular.js:13890:11)
at Object.Scope.$broadcast (http://localhost:8084/app/resources/js/lib/angular/angular.js:8090:28)
at http://localhost:8084/app/resources/js/lib/angular/angular.js:7250:26
at wrappedCallback (http://localhost:8084/app/resources/js/lib/angular/angular.js:6650:59) <!-- ngRepeat: item in data | itemsPerPage: 2 --> angular.js:5582
GET http://localhost:8084/app/function%20(elem,%20attrs)%20%7B%20%20%20%20%20%2…%7C%20paginationTemplate.getPath();%20%20%20%20%20%20%20%20%20%20%20%20%7D 404 (Not Found) angular.js:9052
Uncaught TypeError: undefined is not a function
어떤 생각이 문제가 무엇 :
여기에 콘솔에서 오류가 있습니까?
당신의 HTML이 진짜라면 "
마지막 구석을 확인하십시오. 파일 사용 권한, 스크립트 호출 순서 (AngularJS 첫 번째, 두 번째 모듈, yourApp.js 세 번째). – klauskpm