Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.13.0/ui-bootstrap-tpls.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app="test" ng-controller="Test">
  <pagination total-items="resultCount" ng-model="currentPage" ng-change= "pageChanged()"></pagination>
  
  <button type="button" ng-click="setCount()">set count to 100</button>
</body>
</html>
 
angular.module("test", ['ui.bootstrap'])
.controller("Test", function($scope){
  // $scope.currentPage = 3;
  
  $scope.pageChanged = function(){
    alert($scope.currentPage + " is the current page.");
  }
  
  $scope.setCount = function(){
    $scope.resultCount = 100;
    $scope.currentPage = 3;
  }
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers