Last active
December 28, 2015 19:59
-
-
Save matsko/7553862 to your computer and use it in GitHub Desktop.
This file contains 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
<script type="text/ng-template" id="form-template"> | |
<div ng-messages> | |
<div ng-message="invalid">You entered an invalid value for this field</div> | |
<div ng-message="required">This value is required</div> | |
<div ng-message="minlength">Your value is too short</div> | |
</div> | |
</script> | |
<form> | |
<input name="myEmailInput" /> | |
<div ng-messages-for="myForm.myInput" template="form-template"> | |
<!-- this replaces the "invalid" message <div> inside of the template above --> | |
<div ng-message="invalid">You entered your email incorrectly</div> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment