Skip to content

Commit 9254c5c

Browse files
author
Warren Seymour
committed
Add two-way data binding example
1 parent f9ff863 commit 9254c5c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>AngularJS Workshop &middot; Data Binding</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link href="/lib/bootstrap/css/bootstrap.css" rel="stylesheet">
7+
</head>
8+
<body ng-app>
9+
<div class="container">
10+
<h1 class="page-header">AngularJS Workshop &middot; Data Binding</h1>
11+
12+
<h2>Two-way binding with <em>ng-model</em></h2>
13+
14+
<div class="form-group">
15+
<p>Hello {{ name }}</p>
16+
<input type="text" class="form-control" ng-model="name">
17+
</div>
18+
19+
<div class="form-group">
20+
<input type="text" class="form-control" ng-model="alertClass">
21+
</div>
22+
23+
<p class="alert alert-{{alertClass}}">Check this out!</p>
24+
</div>
25+
26+
<script src="/lib/angular/angular.js"></script>
27+
</body>
28+
</html>

0 commit comments

Comments
 (0)