Hello Reader's if you want to learn Angular JS then this blog is the best to understand it.
Here I'll create a script written in Angular that will reprint the charracter which are typed in text box.
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
First Name: <input type="text" ng-model="firstName"><br>
Last Name: <input type="text" ng-model="lastName"><br>
<br>
Full Name: {{firstName + " " + lastName}}
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.firstName = "Type Here and see";
$scope.lastName = "This is the second line";
});
</script>
</body>
</html>
Now the time when this Angular JS will load, Page will show a text box where user can type the text and that text will auto print to below the box in plain text. The main advantage of the Angular JS is this will happen in real time.
0 Comment(s)