angular.extend
2015-10-16 16:33
302 查看
function f1() {} var f2 = angular.extend(f1, { active: false, toggle: function() { this.active = !this.active } }) console.log(f1, f1.active) console.log(f2, f2.active) f1.toggle() console.log(f1, f1.active) console.log(f2, f2.active) var o1 = { a: 'a' } var o2 = angular.extend(o1, { b: 'b' }) console.log(o1, o2)
相关文章推荐
- angularjs于directive声明scope说明何时以及如何使用对象修饰符
- 学习笔记-AngularJs(十)
- angular ng-href
- [AngularJS]Argument 'xxxx' is not a function, got undefined
- 基于AngularJS实现页面滚动到底自动加载数据的功能
- angularJs中factory,service,provider
- angularJS与bootstrap结合实现动态加载弹出提示内容
- angularJS配合bootstrap动态加载弹出提示内容
- angularJS与bootstrap结合实现动态加载弹出提示内容
- 基于AngularJS实现页面滚动到底自动加载数据的功能
- AngularJS 中的 factory、 service 和 provider区别
- 如何在play框架的前端_通过Angularjs框架使用html模板
- angular this vs $scope (How does 'this' and $scope work in AngularJS controllers?)
- angula 之 ngModel
- 前端开发工具集-----项目开发AngularJS篇
- AngularJS 表单验证
- AngularJs + REST API 文件下载
- Angularjs与bootstrap.datetimepicker结合实现日期选择器
- table sorting–angularjs
- 指令<AngularJs>