87,955
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="js/angular.min.js" type="text/javascript"></script>
<script type="text/ecmascript">
var app = angular.module("myApp", []);
app.controller("controller", ["$scope", function ($scope) {
$scope.person = [
{ "id": 1, "name": "zgh" },
{ "id": 2, "name": "zjj" }
];
$scope.me = 3;
$scope.test = function () {
alert($scope.me);
}
} ]);
</script>
</head>
<body ng-app="myApp">
<div ng-controller="controller">
<select ng-model="me" ng-options="p.id as p.name for p in person">
</select>
<button ng-click="test()">test</button>
</div>
</body>
</html>