You were updating a piece of code outside of angular and you had to know angular for the processing itself.
$scope.selectPage = function(pageIndex) { $scope.currentPage = pageIndex; $scope.draw(); $scope.$apply(); }
I added $ scope. $ apply (); and now currentPage is updated correctly on input. Here are the documents on the $ apply method: http://docs.angularjs.org/api/ng.$rootScope.Scope#$apply
jsfiddle : http://jsfiddle.net/zZURe/14/
Mathew berg
source share