Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body ng-controller="myCtrl">
  <select ng-model="searchObject.PageSize1">
    <option value="1">1</option>
    <option value="5">5</option>
    <option value="10">10</option>
  </select>
  <select ng-model="searchObject.PageSize2" ng-options="item for item in list.PageSize2"></select>
  <div ng-repeat="searchItem in searchObject">{{searchItem}}</div>
  
  選單1: {{searchObject.PageSize1}}
  <br>
  選單2: {{searchObject.PageSize2}}
  
</body>
</html>
 
function myCtrl($scope){
  $scope.searchObject = {
        PageSize1: 1,
        PageSize2: 1
    };
  $scope.list = {
        PageSize2: [1, 5, 10]
    };
 
  $scope.$watch('searchObject.PageSize1', function () {
        console.log($scope.searchObject.PageSize1);
        
    });
  $scope.$watch('searchObject.PageSize2', function () {
        console.log($scope.searchObject.PageSize2);
        
    });
   
}
Output

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

Dismiss x
public
Bin info
annaismepro
0viewers