Angular page

0

I'm following this example:

link

My file js:

var App = angular.module('SimulatorApp',['ui.utils.masks','ui.bootstrap', 'angularModalService', 'datatables','ngSanitize', 'ui.tinymce']);

App.controller('TestController', [ '$window', '$location', '$rootScope', '$scope', '$q','$http', '$timeout', 'TestService', function($window, $location, $rootScope, $scope, $q, $http, $timeout, TestService) {    

$scope.filteredTodos = [];
$scope.currentPage = 1;
$scope.numPerPage = 10;
$scope.maxSize = 5;

$scope.makeTodos = function() {
  $scope.todos = [];
  for (i=1;i<=100;i++) {
    $scope.todos.push({ text:"todo "+i, done:false});
  }
};
$scope.makeTodos(); 

$scope.$watch("currentPage + numPerPage", function() {
  var begin = (($scope.currentPage - 1) * $scope.numPerPage)
  , end = begin + $scope.numPerPage;

  $scope.filteredTodos = $scope.todos.slice(begin, end);
});

But the paging does not appear:

<asset:stylesheet src="bootstrap.min.css"/> 
<asset:javascript src="angular.min.js"/>
<asset:javascript src="ui-bootstrap.js"/>
<asset:javascript src="bootstrap.min.js"/>
<asset:javascript src="ui-bootstrap-tpls.js"/>

<pagination 
  ng-model="currentPage"
  total-items="todos.length"
  max-size="maxSize"  
  boundary-links="true">
</pagination>

I have also added the js and css.

What is the one that calls that tag?

    
asked by sirdaiz 02.06.2017 в 10:27
source

1 answer

-1
  • Could you put your controller?
  • Have you added references to the bootstrap library?

In this example, the UI Bootstrap directives are being used. I leave here the link so you can access them, if you are missing. UI Bootstrap

    
answered by 02.06.2017 в 10:36