首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏杰的记事本

    ng-options在IE上数据不改变的问题

    最近遇见angularjs 在IE上当使用ng-options作为select的选项数据源,并且被套在ng-switch(ng-transclude)之类的,当angular上得ng-options数据源 } ]); 使用方式如下: <select ie-select-fix="options" ng-model="demos" class="form-control" ng-options

    91220发布于 2019-09-04
  • 来自专栏xingoo, 一个梦想做发明家的程序员

    AngularJS 使用ngOption实现下拉列表

    详细讲述下如何实现下拉列表 更多内容参考:AngularJS知识总结 下拉列表的简单使用 ng-option指令使用很简单,只需要绑定两个属性: 一个是ng-model用于获取选定的值; 另一个是ng-options <select ng-model="engineer.currentActivity" class="form-control" ng-options="act for act in activities label> <select ng-model="engineer.currentActivity" class="form-control" ng-options 的值换成下面: <select ng-model = "engineer.currentActivity" class="form-control" ng-options ng-model = "engineer.currentActivity" class="form-control" ng-options

    3.3K100发布于 2018-01-17
  • 来自专栏网络技术联盟站

    轻松构建灵活的表单,试试AngularJS 选择框

    该指令的语法如下:<select ng-model="selectedOption" ng-options="item as item.label for item in options"></select 通过 ng-options 指令指定选择框的选项列表,其中 item as item.label 表示将每个选项的值和显示文本设置为 item.label。 ngOptions 指令创建一个选择框:

    <select ng-model="selectedOption" ng-options 然后,在 HTML 中使用 ng-options 指令创建选择框,并通过 ng-model 指令实现数据绑定。最后,我们使用双花括号语法展示选择的选项。 下面是一个示例:
    <select ng-model="selectedOption" ng-options

    1.9K30编辑于 2023-07-05
  • 来自专栏ops技术分享

    AngularJS Select(选择框)

    ---- 使用 ng-options 创建选择框 在 AngularJS 中我们可以使用 ng-option 指令来创建一个下拉列表,列表项通过对象和数组循环输出,如下实例: 实例

    <select ng-init="selectedName = names[0]" ng-model="selectedName" ng-options ---- ng-options 与 ng-repeat 我们也可以使用ng-repeat 指令来创建下拉列表: 实例 <select> <option ng-repeat="x in names">{{ x}}</option> </select> ng-repeat 指令是通过数组来循环 HTML 代码来创建下拉列表,但 ng-options 指令更适合创建下拉列表,它有以下优势: 使用 ng-options 指令,选择的值是一个对象: 实例 使用 ng-options: <select ng-model="selectedSite" ng-options="x.site for x in sites">

    3.2K40发布于 2021-07-23
  • 来自专栏angularejs学习篇

    angularjs小练习(分别通过ng-repeat和ng-option动态生成select下拉框)

    通过ng-options 实现

    <select ng-model="city" id="selectCity1" ng-options="city1.name for

    1.8K20发布于 2018-09-20
  • 来自专栏柠檬先生

    Angularjs基础(五)

    使用ng-options创建选项框     在AngularJS 中我们可以使用ng-option指令来创建一个下拉列表,列表通过对象和数组循环输出       实例:         

                <select ng-model="selectedName" ng-options="x option ng-repeat="x in name">{{x}}</option>     </select>     ng-repeat指令是通过数组来循环HTML 代码来创建下拉列表,但ng-options 指令更适合创建下拉列表,它有一下优势     使用ng-options的选项的一个对象,ng-repeat是一个字符串。 :         <select ng-model="selectedSite" ng-options="x.site for x in sites"></select>         <h1

    4.3K50发布于 2018-01-19
  • 来自专栏代码人生

    AngularJS系列(五)——下拉框

    ng-app="myApp"ng-controller="myCtrl"> <select ng-init="selectedName =names[0]" ng-model="selectedName" ng-options myCtrl', function($scope) { $scope.names = ["baidu", "alibaba","tencent"]; }); </script>

    该实例演示了 ng-options myApp"ng-controller="myCtrl">

    选择网站:

    <select ng-init="selectSite =sites[0]" ng-model="selectSite" ng-options , {site : "Taobao", url :"http://www.taobao.com"} ]; }); </script>

    该实例演示了使用ng-options myApp"ng-controller="myCtrl">

    选择一辆车:

    <select ng-init="selectCar =cars['car01']" ng-model="selectCar" ng-options

    2K30发布于 2019-10-30
  • 来自专栏技术综合

    Angularjs下拉框联动(1)

    实现截图 html <select ng-model="s1" ng-options="selectData.name for selectData in selectDatas"> <option value="">--产品类目--</option> </select> <select ng-model="s2" ng-options="util.name for

    2.9K20发布于 2020-08-25
  • 来自专栏技术综合

    Angularjs下拉联动(2)

    总类别选择后,会关联出设备 3.设备选择后,会关联出属性 4.属性选择后,会根据属性的不同,关联出不同的项目 2.代码 1)设备类别下拉 html <select ng-model="devicetype" ng-options mac:32309fsaf)"} ]; break; } } 2)设备下拉 html <select ng-model="yourdevice" ng-options v.display_name] = v; }) $scope.paramobjs = paramobj; } } 3)属性下拉 html <select ng-model="param" ng-options

    2.1K20发布于 2020-08-25
  • 来自专栏angularejs学习篇

    angularjs小练习(分别通过ng-repeat和ng-option动态生成select下拉框)

    通过ng-options 实现

    <select ng-model="city" id="selectCity1" ng-options="city1.name for

    1.1K00发布于 2018-08-30
  • 来自专栏全栈程序员必看

    【AngularJS】 # AngularJS入门

    使用 ng-options 创建选择框 创建一个下拉列表,列表项通过对象和数组循环输出

    <select ng-init ="selectdName = names[0]" ng-model="selecteName" ng-options="x for x in names"></select>
    <script 数据源为数组
    <select ng-model="selSite" ng-options="x.site -- y.brand 是在下拉框中显示的数据 --> <select ng-model="selCar" ng-options="y.brand for (x, y) in cars"></select ng-options="。。。"

    27.9K60编辑于 2022-09-15
  • 来自专栏柠檬先生

    Angularjs基础(十二)

    ng-options         描述:在<select>列表中指定<options>           实例:使用数组元素填充下拉列表:         

              <select ng-model="selectedName" ng-options="item for item in Emil","Tobias","Linus"];               })         </script>           定义和用法:               ng-options ng-options指令使用数组来填充下拉列表,多次情况下与ng-repeat 指令一起使用。               

    4K100发布于 2018-01-22
  • 来自专栏技术综合

    实习第八周

    image.png 3.下拉框改变时触发 使用ng-change <select ng-model="devicetype" ng-options="x.category for x in devices

    54220发布于 2020-08-25
  • 来自专栏张家辉的树屋

    10-angular 实例学习-1

    controller 和 ng-options CSDN 链接 1.demo: <div ng-app="myApp" ng-init="number=1;cost=1" ng-controller <input type="number" name="" min="0" ng-model="cost" id=""> <select ng-model="inCurr" ng-options 难点: select 其中 ng-options 配合 select 和 option 一起使用。x for x in items 函数 total(x) 首先计算总值,然后再根据汇率进行换算。

    65220发布于 2021-02-02
  • 来自专栏达达前端

    【一起来烧脑】一步学会AngularJS系统

    response.data.sites; }, function errorCallback(response) { // 请求失败执行代码 }); }); 选择框 使用ng-options 创建选择框 <select ng-init="selectedName = names[0]" ng-model="selectedName" ng-options="x for x in names"

    6.8K20发布于 2019-07-18
  • 来自专栏张家辉的树屋

    7-进军 angular1.x 表单和事件、模块

    "myApp" ng-controller="myCtrl"> <select ng-init="selectedName = names[0]" ng-model="selectedName" ng-options

    3.3K20发布于 2021-02-02
  • 来自专栏张家辉的树屋

    11-angular 实例学习-2

    repeat">{{ x }}option> select>
    <select ng-model="formModel" ng-options option> select>
    <select ng-model="formData.channelId" ng-options

    2.8K40发布于 2021-02-02
  • 来自专栏kl的专栏

    angular常用内置指令

    结合ng-model使用,以ng-change为例: 或者比如ng-options {{}} 其实这个也是一个指令,也许觉得和ng-bind差不多,但页面渲染略慢时可能会被看到。

    79810编辑于 2023-11-17
  • 来自专栏软件开发

    前端MVC学习总结(二)——AngularJS验证、过滤器、指令

    3.2、扩展表单元素的指令 3.2.1、ng-options 该指令允许你基于一个迭代表达式添加选项 <select ng-model="color" ng-options="c.name for c name="form1">

    基础下拉列表:

    <select ng-model="user1" ng-options

    带分组的下拉列表:

    <select ng-model="user2" ng-options

    组合的下拉列表:

    <select ng-model="user3" ng-options

    自定义ng-model的值:

    <select ng-model="user4" ng-options

    17.5K60发布于 2018-01-04
  • 来自专栏快乐八哥

    Angular企业级开发(10)-Smart Table插件开发

    getFromItemIndex()}}-{{getToItemIndex()}}/{{stTotalCount}}条  每页显示<select ng-model="stItemsByPage" ng-options

    2.2K60发布于 2018-01-18
领券