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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -