What is AngularJS?
AngularJS is a structural framework for dynamic web apps. It lets
you use HTML as your template language and lets you extend HTML's syntax to
express your application's components clearly and succinctly. Angular's data
binding and dependency injection eliminate much of the code you currently have
to write. And it all happens within the browser, making it an ideal partner
with any server technology.
You really do not need to set up your own environment to start
learning AngularJS. Reason is very simple, we already have set up AngularJS
environment online, so that you can execute all the available examples online
at the same time when you are doing your theory work. This gives you confidence
in what you are reading and to check the result with different options. Feel
free to modify any example and execute it online.
Try the following example using Try
it option available at the
top right corner of the below sample code box −
Example
<!DOCTYPE html>
<html lang="en-US">
<scriptsrc="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="">
<p>Name : <input type="text" ng-model="name"></p>
<h1>Hello {{name}}</h1>
</div>
</body>
</html>
<html lang="en-US">
<scriptsrc="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="">
<p>Name : <input type="text" ng-model="name"></p>
<h1>Hello {{name}}</h1>
</div>
</body>
</html>
No comments:
Post a Comment