AngularJS Examplw Select Boxes

by sonicparke

HTML

<div ng-app="myApp">
  <div ng-controller="AppController">
      
    <select ng-model="initialOption1" ng-options="item.name for item in selectItems">
        <option value="">Initial Option</option>
    </select>
    <select ng-model="initialOption2" ng-options="item.name for item in selectItems">
      <option value="">Initial Option</option>
    </select>
    <select ng-model="initialOption3" ng-options="item.name for item in selectItems">
      <option value="">Initial Option</option>
    </select>

  </div>
</div>

CSS

</style> <!-- Ugly Hack due to jsFiddle issue: http://goo.gl/BUfGZ --> 
<!-- <link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">-->
<!-- <link href="http://bradmcalister.com/cdn/ng-grid.css" rel="stylesheet">-->
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<!--<script src="http://code.jquery.com/jquery.min.js"></script>-->

<!-- REMOVE ME AND THE SELECT BOXES WORK -->
<!-- <script src="http://bradmcalister.com/cdn/ng-grid.js"></script> -->
<!-- REMOVE ME AND THE SELECT BOXES WORK -->

<style>

JavaScript

var app = angular.module('myApp',[]);

app.controller('AppController', function($scope) {
  
 
$scope.selectItems = [{"func":"cert","name":"User1"},{"func":"cert","name":"User2"},{"func":"struct","name":"User3"},{"func":"struct","name":"User4"},{"func":"hdrs","name":"User5"},{"func":"hdrs","name":"User6"},{"func":"null","name":"User7"},{"func":"null","name":"User8"},{"func":"eng","name":"User9"},{"func":"eng","name":"User10"}];
  
 
});