angularjs - why does {form.$valid} not match $scope.form.$valid -
in html, have input type submit tag following attribute
disabled="{form.$valid}"
in controller have
if ($scope.form.$valid) {
if remove disabled attribute, able submit form, if add in, not.
any idea why {form.$valid} not match $scope.form.$valid ?
cheers
try using notation:
<input type="submit" ng-disabled="form.$valid">
it's angular ngdisabled
core directive doing want.
Comments
Post a Comment