1<ul>
2 <li ng-repeat="(key, errors) in form.$error track by $index"> <strong>{{ key }}</strong> errors
3 <ul>
4 <li ng-repeat="e in errors">{{ e.$name }} has an error: <strong>{{ key }}</strong>.</li>
5 </ul>
6 </li>
7</ul>
1<div class="container" ng-app>
2
3 <h1><span><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/15309/angular-logo.svg" alt="Angular.js Logo" /></span> Angular.js - Web Form</h1>
4
5 <form role="form" name="form" id="contact-form" novalidate>
6 <div class="form-group">
7 <label for="FirstName">First name</label>
8 <input type="text" class="form-control" name="FirstName" id="FirstName" placeholder="enter first name" ng-model="firstName" required>
9 </div>
10
11 <div class="form-group">
12 <label for="LastName">Last Name</label>
13 <input type="text" class="form-control" name="LastName" id="LastName" placeholder="enter last name" ng-model="lastName" required>
14 </div>
15
16 <div class="form-group">
17 <label for="EmailAddress">Email address</label>
18 <input type="email" class="form-control" id="EmailAddress" name="EmailAddress" placeholder="enter email" ng-model="emailAddress" ng-model-options="{ updateOn: 'blur' }" required>
19 </div>
20
21 <div class="checkbox">
22 <label>
23 <input type="checkbox" required> Check me out
24 </label>
25 </div>
26
27
28 <button type="submit" class="btn btn-default" ng-disabled="form.$invalid">Submit</button>
29
30 </form>
31
32</div>