web
JtUnion
这个作者很懒,什么都没留下…
展开
-
小人儿的笔记(AngularJS)--01
事件参数$event例1 关于ag中的this及事件源:<input type="button" value="test" ng-click="doTest($event)">------------------------------------$scope.name="myname";$scope.doTest=function(ent){;//事件参数通过页面的$event传入cons原创 2017-02-05 19:14:50 · 306 阅读 · 0 评论 -
小人儿的笔记(AngularJS)--02
$scope中事件传播机制例1:<body ng-controller="ParentController"> <h1>count in body:{{cnt}}</h1> <button ng-click="doAdd()" type="button">add</button> <button ng-click="doEmit()" type="button">emit</原创 2017-02-05 23:45:45 · 315 阅读 · 0 评论 -
小人儿的笔记(AngularJS)--03
表达式1.由$parse服务解析,而不是JS中的eval函数; 2.相对于作用域,而不是全局; 3.可以写在HTML中,使用{{expr}}; 4.容错性:如果有错就不解析; 5.不支持自增、自减、位运算符等; 6.不允许流程控制语句、异常语句; 7.支持过滤器;表达式手动解析<body ng-controller="ExpressController"> <input type原创 2017-02-06 11:49:32 · 473 阅读 · 0 评论 -
小人儿的笔记(AngularJS)--04
过滤器1.用于将数据格式化后展现; 2.AngularJS内置多个过滤器,并支持自定义; 3.可以用在视图模板(templates)、指令(directives)、控制器(controllers)或者服务(services)中; 4.在视图模板或指令中使用运算符“|”添加过滤器; 5.在控制器或服务中使用$filter;Angular共内置了9种过滤器,分别是货币currency :原创 2017-02-06 14:36:54 · 386 阅读 · 0 评论 -
jQuery源码分析之数据类型判断方法——$.type()
[转]jQuery源码分析之数据类型判断方法——$.type()无意中瞟到一眼jQuery源码发现type方法的代码怎么看着那么闹腾,于是乎研究了一下,虽然不知道其中原理,但是从此妈妈再也不担心我如何判断数据类型了。。。。以前认为用typeof判断就ok了,想想真是图样图森破啊,请看示例:typeof new Boolean(1) = "转载 2017-08-21 17:25:57 · 662 阅读 · 0 评论