angularjs1-5,class,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="angular.min.js"></script>
<style>
.red{ background:red; color:blue;}
.yellow{ background:yellow;}
</style>
</head>
<body>
<div ng-app="myApp">
<div ng-controller="firstController">
<div ng-cloak ng-class="{red:s}">{{text}}</div>
<div ng-cloak ng-class="{{sClass}}">{{text}}</div>
<div ng-cloak ng-style="{color:'red'}">{{text}}</div>
<div ng-cloak ng-style="{{style}}">{{text}}</div>
<a href="{{url}}">百度1</a>
<a ng-href="{{url}}">百度</a>
<img src="{{src}}" />
<img ng-src="{{src}}" />
<br>
<br>
<a ng-href="{{url}}" ng-attr-title="{{text}}">百度</a>
<br>
<br>
<div ng-show="s">你好</div> //dispaly显示隐藏
<br>
<br>
<div ng-if="s">你好</div> //dom的移除和没有移除
<div ng-switch on="s">
<p ng-switch-default>默认的效果</p>
<p ng-switch-when="false">false切换的效果</p>
<p ng-switch-when="true">true切换的效果</p>
</div>
<br>
<br>
<div class="animate-switch-container"
ng-switch on="selection">
<div class="animate-switch" ng-switch-when="settings">Settings Div</div>
<div class="animate-switch" ng-switch-when="home">Home Span</div>
<div class="animate-switch" ng-switch-default>default</div>
</div>
<input type="checkbox" ng-model="open"><br/>
<details id="details" ng-open="open">
<summary>Copyright 2011.</summary>
<p>All pages and graphics on this web site are the property of W3School.</p>
</details>
</div>
</div>
<script type="text/javascript">
var app = angular.module("myApp", []);
app.controller('firstController',function($scope){
$scope.text='phonegap中文网';
$scope.s=true;
$scope.sClass = "{red:true,yellow:true}";
$scope.style = "{color:'red',background:'yellow'}";
$scope.url='http://www.baidu.com';
$scope.src='http://www.baidu.com/img/bdlogo.png';
// $scope.style = "{color:'red',background:'yellow'}";
// $scope.sClass = "{red:true,yellow:true}";
// $scope.url = "http://www.baidu.com";
$scope.items = ['settings', 'home', 'other'];
$scope.selection = $scope.items[0];
});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="http://cdn.bootcss.com/angular.js/1.4.0-beta.6/angular-sanitize.min.js"></script>
</head>
<body>
<div ng-app="myApp">
<div ng-controller="firstController">
<div ng-click="run()">点击</div>
<div ng-bind="text"></div>
//绑定多个
<div ng-bind-template="{{text}} {{name}}"></div>
//1.引入angular-sanitize,2.依赖['ngSanitize']
<div ng-bind-html="text2"></div>
</div>
</div>
<script type="text/javascript">
var app = angular.module("myApp", ['ngSanitize']);
app.controller('firstController',function($scope){
$scope.text='phonegap中文网';
$scope.name='中文网';
$scope.text2='<h2>这是h2</h2>';
$scope.run=function(){
alert('run');
console.log('run');
}
});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="../angular.min.js"></script>
<script type="text/javascript" src="http://cdn.bootcss.com/angular.js/1.4.0-beta.6/angular-sanitize.min.js"></script>
</head>
<body>
<div ng-app="myApp">
<div ng-controller="firstController">
<div ng-repeat="innerList in list" ng-init="outerIndex = $index">
<div ng-repeat="value in innerList" ng-init="innerIndex = $index">
<span class="example-init">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>
</div>
</div>
<input type="text" ng-model="name" ng-model-options="{ updateOn: 'blur' }" />
{{name}}
</div>
</div>
<script type="text/javascript">
var app = angular.module("myApp", ['ngSanitize']);
app.controller('firstController',function($scope){
$scope.list = [['a', 'b'], ['c', 'd']];
});
</script>
</body>
</html>
angularjs1-5,class,的更多相关文章
- 逆天通用水印支持Winform,WPF,Web,WP,Win10。支持位置选择(9个位置 ==》[X])
常用技能:http://www.cnblogs.com/dunitian/p/4822808.html#skill 逆天博客:http://dnt.dkil.net 逆天通用水印扩展篇~新增剪贴板系列 ...
- MySQL主从环境下存储过程,函数,触发器,事件的复制情况
下面,主要是验证在MySQL主从复制环境下,存储过程,函数,触发器,事件的复制情况,这些确实会让人混淆. 首先,创建一张测试表 mysql),age int); Query OK, rows affe ...
- Oracle安装部署,版本升级,应用补丁快速参考
一.Oracle安装部署 1.1 单机环境 1.2 Oracle RAC环境 1.3 Oracle DataGuard环境 1.4 主机双机 1.5 客户端部署 二.Oracle版本升级 2.1 单机 ...
- Syscall,API,ABI
系统调用(Syscall):Linux2.6之前是使用int0x80(中断)来实现系统调用的,在2.6之后的内核是使用sysentry/sysexit(32位机器)指令来实现的系统调用,这两条指令是C ...
- 【夯实PHP基础】PHP数组,字符串,对象等基础面面观
本文地址 分享提纲 1.数组篇 2.字符创篇 3.函数篇 4.面向对象篇 5.其他篇 /*************************** 一.数组篇 Begin***************** ...
- MSSQL 事务,视图,索引,存储过程,触发器
事务 事务是一种机制.是一种操作序列,它包含了一组数据库操作命令,这组命令要么全部执行,要么全部不执行. 在数据库系统上执行并发操作时事务是作为最小的控制单元来使用的.这特别适用于多用户同时操作的数据 ...
- 谁偷了我的热更新?Mono,JIT,iOS
前言 由于匹夫本人是做游戏开发工作的,所以平时也会加一些玩家的群.而一些困扰玩家的问题,同样也困扰着我们这些手机游戏开发者.这不最近匹夫看自己加的一些群,常常会有人问为啥这个游戏一更新就要重新下载,而 ...
- Atitit 知识管理的重要方法 数据来源,聚合,分类,备份,发布 搜索
Atitit 知识管理的重要方法 数据来源,聚合,分类,备份,发布 搜索 1.1. Rss 简易信息聚合(也叫聚合内容 Really Simple Syndication1 1.1. Rss 简易信息 ...
- APP测试点总结(功能,交互,死机崩溃状态分析,容易出错的检查点)
APP测试点总结(功能,交互,死机崩溃状态分析,容易出错的检查点) 版权声明:本文为博主原创文章,未经博主允许不得转载. 最近涉足APP端测试,常见检查点总结如下: 一.业务方面: 1. 注册( ...
- 计算机人物系列-Mauchly,Eckert,Goldstine
关键词:莫尔学院(Moore School),阿伯丁试验场(Aberdeen Proving Ground), 雷明顿兰德公司(Remington Rand Corporation), IBM院士(I ...
随机推荐
- Docker 配置与实践清单
https://mp.weixin.qq.com/s/yeEkF5DKa9IjmIvuzOTT3g
- shopping car 2.0
#!/usr/bin/env python# -*- coding: utf-8 -*-# @Time : 2018/5/13 0013 10:20# @Author : Anthony.Waa# @ ...
- angular4搭建博客(一)
本文长期更新,未经运行,严禁转载. 博客(制作中) http://101.200.58.228/ Github https://github.com/Teloi/TEIndex 框架选择 Angula ...
- Vue 项目打包和上线
1.把绝对路径改为相对路径 我们打开config/index.js 会看到一个build属性,这里就我们打包的基本配置了.你在这里可以修改打包的目录,打包的文件名.最重要的是一定要把绝对目录改为相对目 ...
- RGB_D_开发征程(使用Kinect)
学习历程依此为纲! Kinect学习资料: kinect和openNI开发资料汇总:http://blog.csdn.net/chenli2010/article/details/6887646 原始 ...
- 【技术累积】【点】【java】【2】聊一聊似曾相识的switch语句
闲聊 有些东西并不能像爱因斯坦老先生说的那样,书上查的到就不用去记住... 开始 java使用了C的所有流程控制语句: java中同样有switch语句: 大多数情况下,switch都可以用if替换: ...
- chrome模拟微信
这里有一个模拟器,既可以设置模拟很多型号的手机设备,也可以伪造你想要的HTTP_USER_AGENT.选择USER_AGENT,选other,微信的HTTP_USER_AGENT是: 在iPhone下 ...
- (转)RabbitMQ学习之exchange总结
http://blog.csdn.net/zhu_tianwei/article/details/53969674 前面介绍了几类exchange的作用,这个总结一下: direct:消息会被推送至绑 ...
- PhotoZoom Classic 7有什么用?高品质的放大模糊图片!
PhotoZoom Classic 7专门用于放大照片,同时保持质量.该软件配备了BenVista独特的S-Spline技术,可轻松超越Photoshop的双三次插值等替代解决方案. PhotoZoo ...
- 初步使用vue中axios
1.下载axios npm install axios --save 2.两种方式使用axios (1)在模块中引入axios 例如:我在用户登陆界面需要使用axios,就在login页面引入,不是全 ...