ng-selected 運用

html:html

<select ng-model="postParams.pt_type">post

        <option value="0" ng-selected="0==postParams.pt_type">0</option>
        <option value="1" ng-selected="1==postParams.pt_type">1</option>
        <option value="2" ng-selected="2==postParams.pt_type">2</option>
        <option value="3" ng-selected="3==postParams.pt_type">3</option>
        <option value="4" ng-selected="4==postParams.pt_type">4</option>
        <option value="5" ng-selected="5==postParams.pt_type">5</option>
    </select>htm

js:io

 $scope.postParams.pt_type = 1;select

相關文章
相關標籤/搜索