ng-repeat && ng-options的故事
 

1.

<select class="input-small" ng-model="newHost.os"

               style="width:102px;" ng-show="osType==2">
                <option ng-repeat="item in osList.Linux" value="{{item.id}}">{{item.name}}</option>
 </select>
 
 
2.为了觉得ie8的兼容性问题请用这一款!
<select class="input-small" ng-model="newHost.os"  style="width:102px;" ng-show="osType==2" ng-options="item.id as item.name for item in osList.Linux" ng-init="osList.Linux[0].id">
 </select> 
 
 

ng-repeat && ng-options的故事的更多相关文章

  1. Part 6 AngularJS ng repeat directive

    ng-repeat is similar to foreach loop in C#. Let us understand this with an example. Here is what we ...

  2. Angular6之ng build | ng build --aot | ng build --prod 差异

    由于写了大半年的项目终于要告一段落并且即将进行第二阶段优化开发,emmm 基础版本已经二十多个模块了,必不可少的优化是很重要的,尽管项目上使用多层嵌套懒加载,但是在首屏加载的时候,任然很慢啊,因为一直 ...

  3. Pytorch版本yolov3源码阅读

    目录 Pytorch版本yolov3源码阅读 1. 阅读test.py 1.1 参数解读 1.2 data文件解析 1.3 cfg文件解析 1.4 根据cfg文件创建模块 1.5 YOLOLayer ...

  4. Flume NG Getting Started(Flume NG 新手入门指南)

    Flume NG Getting Started(Flume NG 新手入门指南)翻译 新手入门 Flume NG是什么? 有什么改变? 获得Flume NG 从源码构建 配置 flume-ng全局选 ...

  5. ng环境搭建步骤

    1,安装node node -v查看版本号 2,安装淘宝镜像 npm config set registry https://registry.npm.taobao.org 3,安装cnpm npm ...

  6. How to Pronounce the Letters NG – No Hard G

    How to Pronounce the Letters NG – No Hard G Share Tweet Share Most of the time when you see the lett ...

  7. [Angular 6] 初学angular,环境全部最新,[ ng serve ] 不能启动,卡在 95% 不动 => 解决方案

    2018.9.7 问题描述: 通过ng serve命令启动angular应用时,卡在95%, ctrl+c 停掉后看到错误内容为找不到ng_modules下的angular模块下的package.js ...

  8. ng 构建

    1.ng 构建和部署 构建:编译和合并ng build 部署:复制dist里面的文件到服务器 2.多环境的支持 配置环境package.json "scripts": { &quo ...

  9. Angular CLI 启动 版本ng 4

    npm install -g angular-cli ng -v ng new project_name cd project_name ng serve 浏览器打开输入 localhost:4200

  10. JS魔法堂:jsDeferred源码剖析

    一.前言 最近在研究Promises/A+规范及实现,而Promise/A+规范的制定则很大程度地参考了由日本geek cho45发起的jsDeferred项目(<JavaScript框架设计& ...

随机推荐

  1. PIC32MZ tutorial -- Core Timer

    Core Timer is a very popular feature of PIC32 since it is a piece of the MIPS M4K core itself and is ...

  2. JS学习知我见(常用建站代码)

    <!doctype html><html><head><meta charset="utf-8"><meta name=&qu ...

  3. AJAX实现跨域的三种种方法(代理,JSONP,XHR2)

    由于在工作中需要使用AJAX请求其他域名下的请求,但是会出现拒绝访问的情况,这是因为基于安全的考虑,AJAX只能访问本地的资源,而不能跨域访问. 比如说你的网站域名是aaa.com,想要通过AJAX请 ...

  4. IE6-8下自定义标签的表现

    IE6-8是支持自定义标签,但只支持<xxx-yyy />这样的形式,它会翻译成<xxx-yyy></xxx-yyy> 如果你想内套子标签会失败, <ms-k ...

  5. convert return char from sql server 2008 r2 or below version to c#

    C# string.Replace((char)13, ' ') //newline char; string.Replace((char)10, ' ') //return char;

  6. apache配置多域名多站点记录

    <VirtualHost *:80>  DocumentRoot "/mnt/web/www.*.cn"  ServerName www.*.cn  ErrorLog ...

  7. ArcEngine批量添加XY数据

    使用ArcGIS Desktop “添加XY数据”或者“创建XY事件图层”工具 可以导入Excel坐标数据,生成临时图层并添加至ArcMap.ArcGlobe或者ArcScene中.在ArcEngin ...

  8. &&和||的妙用

    在js逻辑运算中,0."".null.false.undefined.NaN都会判为false,其他都为true 几乎所有语言中||和&&都遵循“短路”原理,如&a ...

  9. IPython, Notebook, NumPy, SciPy, matplotlib 和其它

    安装这些工具pip install ipython pip install notebookpip install numpypip install scipypip install matplotl ...

  10. [python] python实现2048游戏,及代码解析。

    我初学python,有不对之处望大家指教.转载请征得同意. 我在网络上也找了一些2048游戏代码的讲解,但都不是特别详细.所以我希望能够尽量详细的讲解.同时,有的地方我也不懂,希望大家能帮助补充.我会 ...