Is there a way to prevent the pagination control from changing the model value to 1 on initial load? You can find a Plunker showcasing this issue here.
<!DOCTYPE html>
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body ng-app="testApp" ng-controller="testCtrl">
<pagination ng-model="currentPage"></pagination>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.11.0/ui-bootstrap-tpls.min.js"></script>
<script>
var testApp = angular.module('testApp', ['ui.bootstrap']);
var testCtrl = function($scope) {
$scope.currentPage = 4;
$scope.$watch('currentPage', function(){
alert($scope.currentPage);
});
}
testCtrl.$inject = ['$scope'];
testApp.controller('testCtrl', testCtrl);
</script>
</html>
Thank you.