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>

 

转载于:https://www.cnblogs.com/yaowen/p/7225388.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/416327.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

自己定义ViewGroup控件(一)-----gt;流式布局进阶(一)

main.xml <?xml version"1.0" encoding"utf-8"?> <com.example.SimpleLayout.MyLinLayout xmlns:android"http://schemas.android.com/apk/res/android" xmlns:tools"http://schemas.android.com/tools" android:layout_wi…

oracle计算表的大小,简要分析估算oracle表的大小

查询oracle表的大小有几种方法&#xff0c;笔者简要分析下他们的异同环境&#xff0c;newsadmin.newlog&#xff0c;原本有244,459,078条记录&#xff0c;delete后&#xff0c;现在只有51,109,919记录。一、segmentsselect bytes/1024/1024/1024 from dba_segments where segme…

NOIP2007 count 统计数字

问题描述 某次科研调查时得到了n个自然数&#xff0c;每个数均不超过1.5109。已知不相同的数不会超过10000个&#xff0c;现在需要统计这些自然数各自出现的个数&#xff0c;并按照自然数从小到大的顺序输出统计结果。 输入 输入文件count.in包含n1行&#xff1b; 第一行是…

【C++11/17】std::map高效插入

我们在使用stl的映射容器std::map时&#xff0c;经常需要向容器中插入数据。由于map的元素key值是唯一的&#xff0c;我们经常遇到这样的场景&#xff1a; 向map中插入元素时&#xff0c;指定的key已经存在则直接更新&#xff1b;指定的key不存在&#xff0c;然后才做插入操作…

oracle 监听 无法连接,oracle监听hang,无法建立新连接TNS-12540

TNS-12518: TNS:listener could not hand off client connectionTNS-12540: TNS:internal limit restriction exceeded监听无法建立新连接&#xff0c;报如上错误&#xff0c;请教各位大神是什么原因&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;…

pgd 游戏教程 基地

http://www.pascalgamedevelopment.com/content.php?417-Castle-Game-Engine-6-2-released转载于:https://www.cnblogs.com/delphi-xe5/p/7237464.html

oracle选择外键列,Oracle外键列上是否需要索引?

外键列上缺少索引会带来两个问题&#xff0c;限制并发性、影响性能。而这两个问题中的任意一个都可能会造成严重性能问题。 无论是Or外键列上缺少索引会带来两个问题&#xff0c;限制并发性、影响性能。而这两个问题中的任意一个都可能会造成严重性能问题。无论是Oracle的官方文…

select * 和select 所有字段的区别

文章取自http://blog.csdn.net/u014305991/article/details/44964171 MySQL 5.1.37 表记录数41,547,002&#xff0c;即4000w行 使用远程客户端取1000条数据&#xff0c;统计时间&#xff1a; SELECT * FROM dmsp.dmsp_dimension_content LIMIT 0, 1000; 时间2.218s&#xff0c;…

php的strpos不支持数字,php使用strpos判断字符串中数字类型子字符串出错的解决方法 原创...

php使用strpos判断字符串中数字类型子字符串出错的解决方法 原创这里有新鲜出炉的 PHP 面向对象编程&#xff0c;程序狗速度看过来&#xff01;PHP 开源脚本语言PHP(外文名: Hypertext Preprocessor&#xff0c;中文名&#xff1a;"超文本预处理器")是一种通用开源脚…

css动画详解 (transition animation)

属性 transition&#xff08;4个属性&#xff09;: transition: width 5s ease 3s; /*简写*/transition-property: width; /*过渡属性名*/transition-duration: 5s; /*持续时间&#xff0c;默认为0*/transition-timing-function: ease; /*速度*/transition-delay: 3s; /*延迟*…

php ajax session死锁,session过期,ajax请求处理

session会话过期&#xff0c;如果是请求。可以直接定位到页面。如果是ajax请求。无法跳转到页面。可以通过如下方式实现&#xff0c;在Response的输出流里面&#xff0c;向前端写一段html代码来实现。public boolean preHandle(HttpServletRequest request, HttpServletRespons…

NYOJ题目 263 精挑细选

题目描述&#xff1a; 小王是公司的仓库管理员&#xff0c;一天&#xff0c;他接到了这样一个任务&#xff1a;从仓库中找出一根钢管。这听起来不算什么&#xff0c;但是这根钢管的要求可真是让他犯难了&#xff0c;要求如下&#xff1a;1、 这根钢管一定要是仓库中最长的&…

充电桩系统php源码,源码 充电桩程序设计 - 下载 - 搜珍网

压缩包 : e0f671190e843b596bf8d7dfd98914.zip 列表源码/00/源码/00/delay.crf源码/00/delay.d源码/00/delay.o源码/00/gui.crf源码/00/gui.d源码/00/gui.o源码/00/inc/源码/00/inc/delay.h源码/00/inc/io_bit.h源码/00/inc/main.h源码/00/inc/stm32f10x_conf.h源码/00/inc/stm…