javascript - AngularJS is not validating my form -


i know angular pretty well, use everyday, apparently, i'm having 1 of days..

i'm missing hideously obvious, why aren't seeing testform.testfield.$invalid & testform.testfield.$dirty etc???

var myapp = angular.module('myapp',[]);
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>  <div ng-app="myapp">      <form name="testform">          <input type="text" name="testfield" ng-model="testfield" required="required" />          {{testform | json}}              {{testfield}}      </form>  </div>

if in angular source, conversion json says:

properties leading $ characters stripped since angular uses notation internally.

unfortunately documentation json filter doesn't mention that.

see https://github.com/gaborcs/angular.js/blob/master/src/angular.js lines 930-931.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -