-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtwoWaybinding.html
More file actions
34 lines (28 loc) · 1.07 KB
/
Copy pathtwoWaybinding.html
File metadata and controls
34 lines (28 loc) · 1.07 KB
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
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
Name: <input ng-model="name"><br><br>
Choose a car:
<select name="cars" id="cars" ng-model="car">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select><br><br>
Review of W3Schools:</p>
<textarea id="w3review" name="w3review" rows="4" cols="50" ng-model="text">At w3schools.com you will learn how to make a website. They offer free tutorials in all web development technologies.</textarea>
<h1>You entered: {{name}}</h1>
<h1>You entered: {{car}}</h1>
<h1>You entered: {{text}}</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.name = "John Doe";
});
</script>
<p>Change the inside inside the input field, and you will see the name in the header changes accordingly.</p>
</body>
</html>