Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body ng-app="app" ng-controller="ctrl">
  <select ng-model="movielist" ng-options="cat as cat.name for cat in category">           
</select>
<p>Category Id: {{movielist.category_id}}</p>
</body>
</html>
 
angular.module("app", []).controller('ctrl', function($scope){
  $scope.category = [
    { "category_id": 0, "name": "zero"},
    { "category_id": 1, "name": "one"},
    { "category_id": 2, "name": "two"}
  ];
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers