(1)知識庫javascript
http://lib.csdn.net/node/391php
https://github.com/jikexueyuanwiki/angularjs-guidehtml
https://docs.angularjs.org/api/java
http://docs.ngnice.com/guide/bootstrapnode
(2)參考示例
https://github.com/monw3c/angularjs_pingangit
https://github.com/atian25/wandoujia-satanangularjs
https://github.com/doggy8088/ng-kp-api-samplegithub
(3)語法糖json
https://www.cheatography.com/proloser/cheat-sheets/angularjs/
(4)學習筆記
http://www.360doc.com/content/14/0207/17/203871_350503283.shtmlbootstrap
https://github.com/wangmeijian/AngularJS-controller-directive-filter-service
http://www.cnblogs.com/lvdabao/p/mean-techstack-angular.html
http://www.cnblogs.com/lvdabao/articles/4657235.html
http://www.cnblogs.com/leejersey/p/4543998.html
http://www.cnblogs.com/wolf-sun/p/4621854.html
http://www.cnblogs.com/darrenji/p/4982480.html
http://my.oschina.net/blogshi/blog/280400
http://www.cnblogs.com/obeing/p/5215140.html
http://my.oschina.net/u/2395167/blog/520532?p={{totalPage}}
返回值:this指向self的新函數
var obj = { name: 'xxx', print: function (country) { console.log(this.name + ' is form ' + country); } }; var self = { name: 'yyy' }; var bindFn = angular.bind(self, obj.print, 'China'); //var bindFn = angular.bind(self, obj.print, ['China']); obj.print('American'); //$ xxx is form American bindFn(); //$ yyy is form China
注意:bind會根據你的參數類型來決定調用call或apply,因此args能夠是一個個數據,也能夠是一個數組哦。
返回值:拷貝的對象
var obj = { name: 'xxx', age: 50 }; var copyObj = angular.copy(obj); console.log(copyObj); //$ Object {name: "xxx", age: 50}
返回值:boolean
angular.equals(3, 3); //$ true angular.equals(NaN,NaN); //$ true angular.equals({name:'xxx'},{name:'xxx'}); //$ true angular.equals({name:'xxx'},{name:'yyy'}); //$ false
返回值:拓展的對象
var dst = {name: 'xxx', country: 'China'}; var src = {name: 'yyy', age: 10}; angular.extend(dst, src); console.log(src); //$ Object {name: "yyy", age: 10} console.log(dst); //$ Object {name: "yyy", country: "China", age: 10}
返回值:obj
var obj = {name: 'xxx', country: 'China'}; angular.forEach(obj, function (value, key) { console.log(key + ':' + value); }); //$ name:xxx //$ country:China var array = ['xxx', 'yyy']; angular.forEach(array, function (item, index) { console.log(index + ':' + item + ' form ' + this.country); }, obj); //$ 0:xxx form China //$ 1:yyy form China
返回值:json對象
var json = angular.fromJson('{"name":"xxx","age":34}'); console.log(json); //$ Object {name: "xxx", age: 34}
返回值:字符串
angular.toJson({name:'xxx'}); //$ "{"name":"xxx"}" angular.toJson({name:'xxx'},true); //$ "{ //$ "name": "xxx" //$ }" angular.toJson({name:'xxx'},10); //$ "{ //$ "name": "xxx" //$ }"
返回值:第一個參數
console.log(angular.identity('xxx','yyy')); //$ xxx
返回值:boolean
angular.isArray(3); //$ false angular.isArray([]); //$ true angular.isArray([1, 2, 3]); //$ true angular.isArray({name: 'xxx'}); //$ false
返回值:boolean
angular.isDate('2012-12-02'); //$ false angular.isDate(new Date()); //$ true
返回值:boolean
angular.isDefined(undefined) //$ false angular.isDefined([]); //$ true
返回值:boolean
angular.isUndefined(undefined) //$ true angular.isUndefined([]); //$ false
返回值:boolean
angular.isFunction(function(){}); //$ true angular.isFunction(3); //$ false
返回值:boolean
angular.isNumber(4); //$ true angular.isNumber('xxx'); //$ false angular.isNumber(new Number(4)); //$ false angular.isNumber(Number(4)); //$ true
返回值:boolean
angular.isObject('xxx'); //$ false angular.isObject(null); //$ false angular.isObject([]); //$ true angular.isObject(function(){}); //$ false angular.isObject({name:'xxx'}); //$ true
返回值:boolean
angular.isString(4); //$ false angular.isString('xxx'); //$ true angular.isString(new String('xxx')); //$ false angular.isString(String('xxx')); //$ true
返回值:改變後的新字符串
var newString = angular.lowercase('XXyyZZ'); console.log(newString); //$ xxyyzz
返回值:改變後的新字符串
var newString = angular.uppercase('XXyyZZ'); console.log(newString); //$ XXYYZZ
做用:空函數
var flag = false; flag ? console.log('xxx') : angular.noop();