0
我無法爲我的應用程序設置Angular/bootstrap
如何在我的情況下設置Angular/Bootstrap UI?
我正在關注此頁面的分頁介紹。
http://angular-ui.github.io/bootstrap/
我app.js
angular.module('myApp', ['ngRoute','ui.bootstrap']).
config(['$routeProvider', function($routeProvider) {
….
}]);
controller.js
angular.module('myApp', ['ngRoute']).
controller('PaginationCtrl',['$scope', function ($scope) {
$scope.totalItems = 64;
$scope.currentPage = 4;
$scope.maxSize = 5;
$scope.setPage = function (pageNo) {
$scope.currentPage = pageNo;
};
$scope.bigTotalItems = 175;
$scope.bigCurrentPage = 1;
}])
HTML
<div id='pagination-wrapper' ng-controller='PaginationCtrl'>
<pagination direction-links="false" total-items="totalItems" page="currentPage" num-pages="smallnumPages"></pagination>
</div>
我沒有錯誤,當我加載頁面,但我可以似乎看不到t他的分頁功能。任何人都可以幫助我嗎?非常感謝!
您是否嘗試過包括在controller.js依賴 'ui.bootstrap'? – BlakePetersen
如果我這樣做,我得到了依賴注入錯誤... – Links