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. js监听浏览器,关闭,刷新

    //浏览器关闭或刷新事件 function bindCloseBrowser() { var a = "注意!!\n您即将离开页面!离开后可能会导致数据丢失\n\n您确定要离开吗?" ...

  2. 安卓基于WifiScanner的签到APP

    没图说个JB?首先上图:      友情提醒:后台数据库使用的是Bmob后端云 主要设计思路:首先选一个附近的wifi,输入签到码,进行签到. 签到之后会启动一个后台线程每隔一段时间扫描附近wifi, ...

  3. cs11_adventure c++_lab1

    exercise1.cc #include <iostream> #include <vector> #include <stdlib.h> #include &l ...

  4. LeetCode-179. Largest Number

    179. Largest Number Given a list of non negative integers, arrange them such that they form the larg ...

  5. 如何判断js中的数据类型

    如何判断js中的数据类型:typeof.instanceof. constructor. prototype方法比较 如何判断js中的类型呢,先举几个例子: var a = "iamstri ...

  6. 自己用C语言写单片机PIC18 serial bootloader

    了解更多关于bootloader 的C语言实现,请加我QQ: 1273623966 (验证信息请填 bootloader),欢迎咨询或定制bootloader(在线升级程序). HyperBootlo ...

  7. U盘FAT32文件系统转换成NTFS文件系统

    首先 点击-开始--运行---输入CMD ----输入convert X:/FS:NTFS 其中 X是U盘所在的盘符

  8. Android 5.0属性

    //水波纹效果//v 指定控件 x屏幕的 x轴 y轴 endRadio 起始位置 水波半径Animator circularReveal = ViewAnimationUtils.createCirc ...

  9. opencv嫁接vlfeat densesift

    #include <opencv2/opencv.hpp> #include <iostream> extern "C" { #include <vl ...

  10. git不是内部命令和可执行程序解决方法

    1.从Git官网下载windows版本的git:http://git-scm.com/downloads 2.一般使用默认设置即可:一路next,git安装完毕! 3.但是如果这时你打开windows ...