摘要: new $q constructor Reject it Resolve it Last Resolved Value {{vm.resolveData | json}} Last Rejected Value {{vm.reje... 阅读全文
posted @ 2014-11-13 22:54 Zhentiw 阅读(374) 评论(0) 推荐(0) 编辑
摘要: Password --------------------------------- //ngChange $scope.onChange=function(){ var newVal =... 阅读全文
posted @ 2014-11-13 18:17 Zhentiw 阅读(1061) 评论(0) 推荐(0) 编辑
摘要: $watchGroup can monitor an array or expression.We watch both email and password by using the same callback function. $scope.$watchGroup(['user.emai... 阅读全文
posted @ 2014-11-13 18:08 Zhentiw 阅读(310) 评论(0) 推荐(0) 编辑
摘要: For the $watch in last article, we watch 'user.password', actually it is a string.If you watch 'user', this object and we do something like:function W... 阅读全文
posted @ 2014-11-13 07:25 Zhentiw 阅读(289) 评论(0) 推荐(0) 编辑
摘要: /** * Created by Answer1215 on 11/13/2014. */function MainCtrl($scope){ function isLongEnough (pwd) { return pwd.length > 4; } functio... 阅读全文
posted @ 2014-11-13 07:19 Zhentiw 阅读(512) 评论(0) 推荐(0) 编辑