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

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -