javascript - $dirty with ng-model-options = { updateOn : 'blur' } -


<form name="angform" novalidate> <div class="form-group">     <label for="name1" class="sr-only">last name</label>     <span ng-show="angform.name1.$dirty">* updated model                 after text box blurred.     </span>     <input type="text" name="name1" id="name1" class="form-control" ng-model="person.lastname"         ng-model-options="{updateon : 'blur'}" ng-disabled="!edit"         placeholder="last name" /> </div> </form> 

the above code have text box span message, expect appear once user interacts (i.e., types) text box, model must updated view value when user leaves text box.

but, span message not displaying interaction happens, gets displayed when user leaves text box.

can please explain me behaviour?


Comments

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -