<!DOCTYPE html>
<html>
<script src="http://www.sargonco.com/Uploads/Public/article/webdistut/javascript/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
Name: <input ng-model="name">
<h1>You entered: {{name}}</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.name = "John Doe";
});
</script>
<p>Change the name inside the input field, and you will see the name in the header changes accordingly.</p>
</body>
</html>
|
Name:
You entered: {{name}}
Change the name inside the input field, and you will see the name in the header changes accordingly.
|