摘要:
new $q constructor Reject it Resolve it Last Resolved Value {{vm.resolveData | json}} Last Rejected Value {{vm.reje... 阅读全文
摘要:
Password --------------------------------- //ngChange $scope.onChange=function(){ var newVal =... 阅读全文
摘要:
$watchGroup can monitor an array or expression.We watch both email and password by using the same callback function. $scope.$watchGroup(['user.emai... 阅读全文
摘要:
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... 阅读全文
摘要:
/** * Created by Answer1215 on 11/13/2014. */function MainCtrl($scope){ function isLongEnough (pwd) { return pwd.length > 4; } functio... 阅读全文