Created
February 2, 2017 03:07
-
-
Save kswin/fd41b4edecca0fe35d16955a83674816 to your computer and use it in GitHub Desktop.
ngModelController demo template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form ng-app="App" ng-controller="AppController" name="myForm"> | |
<div ng-messages="myForm.date.$error"> | |
<div ng-message="parse">Please enter a valid date</div> | |
</div> | |
<input | |
date-digits | |
name="date" | |
ng-model="date" | |
type="text"/> | |
<pre>myForm.date.$error = {{ myForm.date.$error | json }}</pre> | |
<pre>$scope.date: {{ date }}</pre> | |
<pre>$scope.myForm.date.$viewValue {{ myForm.date.$viewValue }}</pre> | |
<pre>$scope.myForm.date.$modelValue {{ myForm.date.$modelValue }}</pre> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment