-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
35 lines (34 loc) · 1.42 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<script src="bower_components/angular/angular.js"></script>
<script src="angular-focus-first-field.js"></script>
<script>
angular.module('myApp', ['angular-focus-first-field'])
.controller('myCtrl', function($scope) {
$scope.text = 'foo';
$scope.myTrigger = false;
});
</script>
</head>
<body ng-app="myApp">
<div ng-controller="myCtrl">
<h2>Basic</h2>
<ng-form name="formBasic" novalidate focus-first-fieldd>
<input type="text" placeholder="Enter some text" ng-model="text"/><br/>
<input type="email" placeholder="Enter your email" ng-model="email"/><br/>
<input type="number" placeholder="Enter your favorite number of all time" ng-model="number"/><br/>
<input type="url" placeholder="Enter your homepage" ng-model="url"/>
</ng-form>
<h2>Trigger</h2>
<h3>Trigger status: {{myTrigger}}</h3>
<button ng-click="myTrigger=!myTrigger">Toggle Trigger</button><br/>
<ng-form name="formTrigger" novalidate focus-first-field focus-first-field-trigger="myTrigger">
<input type="text" placeholder="Enter some text" ng-model="text"/><br/>
<input type="email" placeholder="Enter your email" ng-model="email"/><br/>
<input type="number" placeholder="Enter your favorite number of all time" ng-model="number"/><br/>
<input type="url" placeholder="Enter your homepage" ng-model="url"/>
</ng-form>
</div>
</body>
</html>