一、angular.bind(self, fn, args) ? 1、作用:返回一个新的函数,绑定这个函数的this指向self 2、参数: ? self:新函数的上下文对象 fn:需要绑定的函数 args:传递给函数的参数 3、返回值:this指向self的新...
分类:
Web程序 时间:
2015-10-26 19:09:35
阅读次数:
231
理解Angular中的$apply()以及$digest() Delayed Message: {{message}} 你应该使用$timeout service来代替setTimeout(),因为前者会帮你调用$apply(),让你不需要手动地调用它 ...
分类:
移动开发 时间:
2015-10-26 18:39:45
阅读次数:
220
点击查看AngularJS系列目录 转载请注明出处:http://www.cnblogs.com/leosx/ Angular表单 input, select, textarea控件都是给用户输入数据用的。窗体和控件提都提供了验证服务,使得在用户输入了无效数据的情况下,提交表单之前就可以得到知道。这...
分类:
Web程序 时间:
2015-10-26 18:26:07
阅读次数:
198
Installation Install with?Bower: $?bower?install?angular-percentage-filter Usage Include the library: <script?src="/bower_components/angular-percentage-directive/percentage.js"></script> Impo...
分类:
其他好文 时间:
2015-10-26 12:21:48
阅读次数:
200
This lesson covers using the [input] syntax to change an element property such as “hidden” or “content-editable”. Using properties eliminates the need...
分类:
其他好文 时间:
2015-10-26 07:01:48
阅读次数:
157
Two-way binding still exists in Angular 2 and ng-model makes it simple. The syntax is a combination of the [input] and (output) syntax to represent th...
分类:
其他好文 时间:
2015-10-26 07:00:53
阅读次数:
205
It’s conceptually the same as Angular 1’s ng-repeat, but you’ll find the syntax quite different as it aligns with #refs in Angular 2 and JavaScript “f...
分类:
其他好文 时间:
2015-10-26 06:58:44
阅读次数:
531
点击查看AngularJS系列目录 转载请注明出处:http://www.cnblogs.com/leosx/ 在Angular中,模板是一个包含了Angular特定元素和属性的HTML。Angular结合模板、控制器和模型(model)的信息,动态的呈现一个界面给用户。 有以下几种类型的元素你可以...
分类:
其他好文 时间:
2015-10-23 18:43:40
阅读次数:
190
TypeScript is used heavily as we build up our application, but TypeScript isn’t required. If you want to Inject a Service without using TypeScript, yo...
分类:
其他好文 时间:
2015-10-23 16:26:11
阅读次数:
231
When creating a service, need to inject the sercive into the bootstrap():import {bootstrap, Component, View} from "angular2/angular2";import {TodoInpu...
分类:
其他好文 时间:
2015-10-23 16:12:35
阅读次数:
192