• angularJs 处理下拉列表(select option)


    <select ui-select2="{allowClear: true }" ng-model="orderTreatInfo.performDeptId" id="treatPerformDeptId">
        <option value=""></option>
        <option ng-repeat="performDept in performDeptList" value="{{::performDept.deptCode}}">
            {{::performDept.deptName}}
        </option>
    </select>

    performDeptList 是下拉列表要显示的内容,是一个数组用来ng-repeat遍历的

    performDept 是 performDeptList 的每一项

    value="{{::performDept.deptCode}}" 如果选中这一项value的值就会被赋值给 $scope.orderTreatInfo.performDeptId

    {{::performDetp.deptName}}是用来显示在select中的内容 选择这个 则实际赋值的则是其option标签中的value值

  • 相关阅读:
    Currency Exchange
    Robot Motion
    Crashing Robots
    Parencodings
    Y2K Accounting Bug
    Tautology
    Power of Cryptography
    Radar Installation -poj 1328
    The Pilots Brothers' refrigerator
    【java】之cron表达式
  • 原文地址:https://www.cnblogs.com/ms-grf/p/7011082.html
Copyright © 2020-2023  润新知