AngularJS Boilerplate
by js_test
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<div id="todoPanel" class="panel" ng-app="exampleApp" ng-controller="defaultCtrl">
<form name="myForm" novalidate>
<div class="well">
<div class="form-group">
<label>Select an Action:</label>
<select ng-model="selectValue" ng-options="item.action for item in todos"></select>
</div>
</div>
<div class="well">
<p>Selected: {{selectValue || 'None'}}</p>
</div>
</form>
</div>
JavaScript
angular.module("exampleApp", [])
.controller("defaultCtrl", function ($scope) {
$scope.todos = [{
id: 100,
action: "Get groceries",
complete: false
}, {
id: 200,
action: "Call plumber",
complete: false
}, {
id: 300,
action: "Buy running shoes",
complete: true
}];
});