解决设置select默认选中不生效的方法
$scope.storageTypeList = ['Glusterfs','NFS','Ceph'];
不生效的方法:
<select class="form-control" name="type" ng-disabled="editStorage.usage !== null" required
data-ng-model="storageVO.type">
<option value="{{storageType}}" data-ng-repeat="storageType in storageTypeList">{{storageType}}</option>
</select>
$scope.storageVO.type ='NFS';
生效的方法
<select class="form-control" name="type" ng-disabled="editStorage.usage !== null" required
data-ng-model="storageVO.type">
<option value="{{storageType}}" ng-selected="storageType === storageVO.type"
data-ng-repeat="storageType in storageTypeList">{{storageType}}</option>
</select>
$scope.storageVO.type ='NFS';
主要是紫色字体部分产生的作用
解决设置select默认选中不生效的方法的更多相关文章
- jQuery 设置select默认选中问题
在进行其他操作后,恢复select默认选中 html代码: <select id="shai" style="width:150px;margin:5px 50px ...
- 用jQuery的attr()设置option默认选中无效的解决 attr设置属性失效
表单下拉选项使用selected设置,发现第一次默认选中成功,在页面不刷新的情况下,再次下拉,selected属性设置了,默认选中不生效 在手机端有些浏览器用jQuery的attr()方法设置sele ...
- jQuery 根据value设置radio默认选中
jQuery 根据value设置radio默认选中:HTML: <input type="radio" name="type" value="1 ...
- struts2设置<s:select>默认选中项的方法
struts2的select标签中,常用的有以下几个属性:(1)struts2中的select 标签中,必须设置的属性只有一个,即是list.(2)select标签的list中必须有值,不然会报错.如 ...
- struts2 select 默认选中
jsp: <s:select list="#{'1':'男','2':'女'}" name="sex"/> action: private Stri ...
- 设置select默认值
W3C下设置一个默认值直接为 select.value='默认值'. IE8下设置默认值必须有这个option才能被设置,不像W3C 如chrome这种,直接设置就能显示,如果IE下这样设置的话sel ...
- js获取select默认选中的Option (非当前选中值)
js函数方法: <script> function getDefaultSelectedOption(selectId, valIfNull) { var selectId = selec ...
- 关于ligerUi的ligertree的初始化默认选中指定项目的方法
LigerUi中ligerTree官方示例代码片段: var parm = function (data) { return data.text.indexOf('节点1.3') == 0; }; t ...
- radio,checkbox,select,input text获取值,设置哪个默认选中
11 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title& ...
随机推荐
- mybatis 返回类型为 java.lang.String 接收为null的情景
<select id="selectOnly" parameterType="java.util.Map" resultType="java.l ...
- VTP
VTP VLAN中继协议(Vlan Trunking Protocol),是CISCO专用协议.VTP负责在VTP域内同步VLAN信息,这样就不必在每个交换机上配置相同的VLAN信息.VTP还提供一种 ...
- Kylin Cube构建过程优化
原文地址:https://kylin.apache.org/docs16/howto/howto_optimize_build.html Kylin将一个cube的build过程分解为若干个子步骤,然 ...
- struct在C和C++中的使用总结
主要理解一下两点: 1.在C和C++中struct的常规使用. 2.在C++中struct和class基本一致,除了在访问控制权限方面,即: 通过struct关键字实现的类,属性,函数默认的访问权限为 ...
- css重要知识点
1.float:left;表示靠左显示.它是相对于距离最近的且以relative作为position的父元素而言的. 2.块级元素和行内元素 块级元素:占据了一个矩形框的元素,display属性的值为 ...
- css浮动知识点(转)
转自:http://www.cnblogs.com/iyangyuan/archive/2013/03/27/2983813.html 很早以前就接触过CSS,但对于浮动始终非常迷惑,可能是自身理解能 ...
- tableViewCell上的定时器拖动阻塞
if (_timer == nil) { _timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@sele ...
- ubuntu14.04 安装系统/搜狗/QT/qq/wps/CAJviewer
1.安装ubuntu系统 http://jingyan.baidu.com/album/4dc40848491fc5c8d946f1b1.html?picindex=1 官方网站: ht ...
- python 大量使用json 存储数据时,格式化输出的方式
import json, pprint dic = {'name': 234, 'user_name': 'yan xia ting yu ', 'list': ['ds', 'a', 2], '你好 ...
- python 面向对象编程 之 单例模式
单例模式三种实现方式: 单例模式:单例模式是解决系统资源浪费的一种方案,是指一个类实例化后可以多次使用此对象. 单例模式应用场景:数据库操作.日志.后台打印 # settings.py# Host=' ...