首页 > 代码库 > AngularJS: 使用ng-option生成下拉框并在controller调用

AngularJS: 使用ng-option生成下拉框并在controller调用

Controller代码
</pre><pre name="code" class="javascript">function billsDetailController($scope, $http, $log) {

    var self = this;
    $scope.billsDetailData = http://www.mamicode.com/[];>HTML代码
<pre name="code" class="html">                        <select id="selectError" ng-model="currentPeriod" ng-change="change()" ng-options="option.productName as option.productName for option in model">

                        </select>



AngularJS: 使用ng-option生成下拉框并在controller调用