<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
<div ng-app="myApp" ng-controller="namesCtrl">
<select ng-model="standardCourse.showHours" >
<option value="1" >显示</option>
<option value="0" ng-selected = "1" >不显示</option>
//ng-selected = "1" 是设置默认值的
</select>
</div>
<script>
// 传递参数不止一个,代表新建模块;空数组代表该模块不依赖其他模块
// 如果模块不存在,angular框架会抛异常
angular.module('myApp', []).controller('namesCtrl', function($scope) {
});
</script>
</body>
</html>