随笔分类 - AngularJS学习笔记
关于AngularJS的学习笔记
摘要:先对自定义Directive有一个大体的映像myModule.directive('myDirective',function(injectables){ var directiveDefinitionObject={ restrict:string, priori...
阅读全文
摘要:页面导航 过去,一个URL代表一个页面。但是随着Ajax的兴起,情况发生的很大的变化。不同的内容可以使用同一个URL。这让浏览器中的回退、前进甚至收藏按钮都失去了作用。而AngularJS提供了一套解决方案能够避免这种情况。 怎么解决,有一个小技巧:浏览器不会因为URL中#符号后面的值改变而重新请...
阅读全文
摘要:AngularJS 表单 AngularJS使用了MVX的结构,我们可以是传统的表单更加强大。比如过去我们得自己写一大堆验证,比过过去我们得自己转换用户的输入,现在这些工作全部可以交给AngularJS. 我们唯一要关心的就是model中的值。在AngularJS中 ,form和input其实也是...
阅读全文
摘要:FiltersAngularJS provides fileters to transfrom data from one kind to another . For example: {{user.birthday | date:'yyyy-MM-dd'}}In this example, th...
阅读全文
摘要:DirectivesIn AngularJS, we can use a variety of naming conventions to reference directives .In the AngularJS documentation, all the directive are ind...
阅读全文
摘要:Overcomming same-origin policy restrictions with JSONP.AJAX has a restriction that it can only retrieve data from the same resource.There are several...
阅读全文
摘要:AngularJS内置了$http这个服务来与后台联系。(默认会把接受到的数据转换为json)当然,还有一个$resource来提供与RESTful后台联系的服务。$http服务 $http比较简单,下面是$http的常规用法 $http.get(url,[config]) .success(fun...
阅读全文
摘要:Angular does an excellent job of managing object dependencies. it can even take care of module dependencies.So we can easily group releated services ...
阅读全文
摘要:有以下5中方法注册一个AngularJS可以识别的Servicevalue和constant是两个极其简单的方法,只有少数情况下会使用。 service已经开始复杂了起来。而factory是我认为既简单又有足够灵活的度的方法。最后的provide是最复杂的方法,其他方法都是provide的特殊情况下...
阅读全文
摘要:I am still tired to translate these into Chinese.but who cares? i write these posts just for myselfViewafter a browser is done transforming the arkup'...
阅读全文
摘要:I am tired to translate these into Chinese.but who cares? i write these posts just for myselfScopea new scope is created by the ng-controller directiv...
阅读全文

浙公网安备 33010602011771号