摘要: angular.module('myApp',[]) .controller('firstController',function ($scope) { $scope.status=false; $scope.changeStatus=function (event) { $scope.status=! $scope.sta... 阅读全文
posted @ 2017-10-18 09:04 zhujhhxx 阅读(84) 评论(0) 推荐(0) 编辑
摘要: angular.module('myApp',[]) .factory('Data',function () { return{ message:'Hello ', city:[ { name:'上海', py:'shanghai' }, ... 阅读全文
posted @ 2017-10-17 15:20 zhujhhxx 阅读(504) 评论(0) 推荐(0) 编辑
摘要: angular.module('myApp',[]) .factory('Data',function () { return{ message:'Hello ', city:[ { name:'上海', py:'shanghai' }... 阅读全文
posted @ 2017-10-17 14:53 zhujhhxx 阅读(100) 评论(0) 推荐(0) 编辑
摘要: var values = {name: 'misko', gender: 'male'}; var log = []; angular.forEach(values, function(value, key) { this.push(key + ': ' + value); }, log); expect(log).toEqual(['name: misko', 'gender: male'... 阅读全文
posted @ 2017-10-16 16:27 zhujhhxx 阅读(63) 评论(0) 推荐(0) 编辑
摘要: var firstController = function ($scope){ $scope.name='张三'; $scope.data={ name:'李四', count:20 } $scope.count=0; $scope.$watch('name',function (newValue,oldValue) { ... 阅读全文
posted @ 2017-10-16 15:08 zhujhhxx 阅读(91) 评论(0) 推荐(0) 编辑
摘要: first.data first.Data first-name:{{data.name}} first-message:{{Data.message}} second-name:{{... 阅读全文
posted @ 2017-09-07 13:46 zhujhhxx 阅读(108) 评论(0) 推荐(0) 编辑