<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>

单选按钮
<div ng-app="hd" ng-controller="ctrl">
<input type="radio" ng-model="status" ng-value="1"/>开启
<input type="radio" ng-model="status" ng-value="0"/>关闭

<dvi ng-show="status==0">
正在维修中...
</dvi>

<br/><br/><br/><br/>

复选框
{{data}}
电影:<input type="checkbox" ng-model="data.game" ng-true-value="1" ng-false-value="0"/>
游戏:<input type="checkbox" ng-model="data.video" ng-true-value="1" ng-false-value="0"/>
<div ng-show="data.game==1">
<h1>电影爱好</h1>
</div>
<div ng-show="data.video==1">
<h1>游戏爱好</h1>
</div>
<br/><br/><br/><br/>
{{block}}

下拉列表
<select ng-options="v.value as v.name for v in city" ng-model="block"></select>
</div>
<script>
var m=angular.module('hd',[]);
m.controller('ctrl',['$scope',function($scope){
$scope.status=1;
$scope.data={game:0,video:0};

$scope.block='yongan'
$scope.city=[
{'name':'厦门','value':'xiamen'},
{'name':'泉州','value':'quanzhou'},
{'name':'永安','value':'yongan'},
];
}]);
</script>
</body>
</html>

angular笔记_3的更多相关文章

  1. angular笔记

    /** * Created by Administrator on 2016/5/3 0003. */ ng-app是告诉angularjs编译器把该元素当作编译的根 //定义模块 var myApp ...

  2. Angular笔记-select

    --select-- 设置默认选中值方法: <select ng-model="url" ng-options="x.url as x.site for x in ...

  3. angular笔记_7

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  4. angular笔记_6

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  5. angular笔记_5(全选/反选)

    全选和反选 BUG:当鼠标点击其中一个选项后,在点击全选按钮,该选项失效 <!DOCTYPE html><html lang="en"><head&g ...

  6. angular笔记_4(函数)

    angular.isString();是否字符串 angular.isNumber();是否数字 angular.isArray();是否数组 angular.isDate();是否日期/时间 ang ...

  7. angular笔记_2

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  8. angular笔记_1

    第一个angular文件<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js&q ...

  9. Angular 笔记系列(二)数据绑定

    数据绑定这块儿没啥说的,简单两个例子带过了. Hello World: <!DOCTYPE html> <html ng-app> <head> <title ...

随机推荐

  1. 论文阅读笔记三十六:Mask R-CNN(CVPR2017)

    论文源址:https://arxiv.org/pdf/1703.06870.pdf 开源代码:https://github.com/matterport/Mask_RCNN 摘要 Mask R-CNN ...

  2. 论文阅读笔记八:SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation (IEEE2017)

    原文链接:https://arxiv.org/pdf/1511.00561.pdf github(tensorflow):https://github.com/aizawan/segnet 基于Seg ...

  3. 深入理解JSCore

    https://blog.csdn.net/MeituanTech/article/details/82108667

  4. docker挂载点泄露问题

    本来以为我不会遇到. 结果还是遇到了. 现象为k8s delete pod时,系统一直显示Terminatiing,无论多久都不能正常. 以下两个帖子大概说明了是怎么回事. https://blog. ...

  5. asp.net core 创建允许跨域请求的api, cors.

    配置应用方域名. 在webapi中引用cors包,在startup的Configure\ConfigServices中增加启动项配置,在api中增加EnableCors的Attribute属性.即可. ...

  6. Asp.Net Mvc 返回类型总结

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  7. 【技巧汇总】eclipse中如何跳转到指定行

    技巧汇总 持续更新ing eclipse中如何跳转到指定行 ctrl+L

  8. crunch创建自己的密码字典文件

    http://www.2cto.com/article/201608/542026.html

  9. ELK+Redis+Nginx服务数据存储以及Nginx日志的收集

    PS:此片文章是承接上篇ELK部署文档,再次便不详细说明了 [安装Redis] [root@Redis ~]# wget  http://download.redis.io/releases/redi ...

  10. python--return小练习

    #返回单个值,return a:#一个return后的语句不再执行,def calc_sum(*args): ax = 0 for n in args: ax = ax + nprint(ax); r ...