<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<div ng-app="test" ng-controller="myC">
Name: <input ng-model="firstname">
<h1>{{firstname}}</h1>
<h1>{{lastname}}</h1>
</div>
<script>
var app = angular.module('test', []);
app.controller('myC', function($scope) {
$scope.firstname = "Peak";
$scope.lastname = "Finders";
});
</script>
<div ng-app="test" ng-controller="myC">
Name: <input ng-model="firstname">
<h1>{{firstname}}</h1>
<h1>{{lastname}}</h1>
</div>
<script>
var app = angular.module('test', []);
app.controller('myC', function($scope) {
$scope.firstname = "Peak";
$scope.lastname = "Finders";
});
</script>
No comments:
Post a Comment