Source:https://github.com/getify/You-Dont-Know-JS/blob/master/scope%20&%20closures/ch1.mdCommon Compliation StepsTokenizing/Lexing:breaking up a strin...
分类:
编程语言 时间:
2015-07-02 11:46:57
阅读次数:
174
构建自己的AngularJS,第一部分:Scope和Digest原文链接:http://teropa.info/blog/2013/11/03/make-your-own-angular-part-1-scopes-and-digest.htmlAngular是一个成熟和强大的JavaScript框...
分类:
Web程序 时间:
2015-07-02 11:27:21
阅读次数:
90
学习了AngularJS好长时间,最近再次回首看看指令这部分的时候,觉得比自己刚开始学习的时候理解的更加深入了,尤其是指令的作用域这部分。当初看的是《AngularJS权威指南》这本书,但是感觉这本书关于这方面讲的不是很细致,另外吐槽一下,这本书中文版印刷的质量不是很好,很多地方都有错误;不过讲的还...
分类:
Web程序 时间:
2015-07-01 17:48:38
阅读次数:
338
{{link}} JSfunction test($scope) { $scope.slides = [ [ 1, 1, 1 ],...
分类:
编程语言 时间:
2015-07-01 12:09:28
阅读次数:
503
$scope.toRadians = function (degrees) { return degrees * (Math.PI / 180); } $scope.toDegrees = function (radians) ...
分类:
其他好文 时间:
2015-07-01 11:59:12
阅读次数:
140
Scope用来声明容器中的对象的存货时间。即容器在对象在进入其相应的scope之前,生成并装配这些对象,在该对象不再处于这些scope的限定之后,容器通常会销毁这些对象。
Sprign容器最初提供了两种bean的scope类型:singletoon和prototype。自Spring2.0之后,引入了另外三种scope类型,即request、session和global session类...
分类:
编程语言 时间:
2015-06-30 18:24:50
阅读次数:
609
在之前学习AngularJS的过程中,都是用到了显式依赖注入,比如:
<scripttype="text/javascript">
angular.module(‘app‘,[])
.controller(‘Controller1‘,function($scope){
$scope.something=‘helloworld‘;
});
</script>
依赖注入$scope。这么写有个弊端,在发..
分类:
Web程序 时间:
2015-06-30 13:12:28
阅读次数:
219
angular中的$scope是页面(view)和数据(model)之间的桥梁,它链接了页面元素和model,也是angular双向绑定机制的核心。而ngModel是angular用来处理表单(form)的最重要的指令,它链接了页面表单中的可交互元素和位于$scope之上的model,它会自动把ng...
分类:
其他好文 时间:
2015-06-29 07:36:55
阅读次数:
142
在angularjs的controller中一段代码,展示如下:var sortList = new SortList();sortList.setSorts([$scope.year_invest_sort]);$scope.sorts = sortList.getSorts();$scope.b...
分类:
Web程序 时间:
2015-06-28 23:01:44
阅读次数:
162
文档上记录是这样的The Scope of Instance VariablesTo enforce the ability of an object to hide its data, the compiler limits the scope of instance variables—that...
分类:
移动开发 时间:
2015-06-28 12:39:00
阅读次数:
177