Skip to content

Instantly share code, notes, and snippets.

@bsao
Created March 19, 2015 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsao/28b758ddcf0e56fadad6 to your computer and use it in GitHub Desktop.
Save bsao/28b758ddcf0e56fadad6 to your computer and use it in GitHub Desktop.
<form name="myForm" class="my-form">
<a href="#" ng-click="register(myForm)">aaa</a>
userType: <input name="input" ng-model="userType" required>
<span class="error" ng-show="myForm.input.$error.required">Required!</span><br>
<tt>userType = {$ userType $}</tt><br>
<tt>myForm.input.$valid = {$ myForm.input.$valid$}</tt><br>
<tt>myForm.input.$error = {$ myForm.input.$error$}</tt><br>
<tt>myForm.$valid = {$ myForm.$valid $}</tt><br>
<tt>myForm.$error.required = {$!!myForm.$error.required$}</tt><br>
</form>
@bsao
Copy link
Author

bsao commented Mar 19, 2015

myForm.input.$valid will be always invalid! I don't know why.

I am trying to isolate the problem to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment