Introduction:
Here I will explain AngularJS tutorial with simple hello world example or AngularJS tutorial example for beginners. AngularJS is a MVC based JavaScript framework which is written completely using JavaScript. In AngularJS we have set of different directives which we used commonly in AngularJS application those are ng-app, ng-controller and ng-bind directives.
Description:
In previous articles I explained Angularjs show hide div on checkbox selection, Angularjs refresh div for every 1 second using interval mode, Angularjs convert number to currency format, Angularjs get dropdownlist selected value, Angularjs convert text to uppercase while typing and many articles relating to AngularJS, jQuery, JavaScript and asp.net. Now I will explain AngularJS tutorial with simple hello world example.
In previous articles I explained Angularjs show hide div on checkbox selection, Angularjs refresh div for every 1 second using interval mode, Angularjs convert number to currency format, Angularjs get dropdownlist selected value, Angularjs convert text to uppercase while typing and many articles relating to AngularJS, jQuery, JavaScript and asp.net. Now I will explain AngularJS tutorial with simple hello world example.
ng-model: This directive is used to bind
value of input field to application variable name.
|
Simple
Hello World Program
If you want to check it in complete example you need to
write the code like as shown below
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>AngularJS Tutorial and
Hello World Example</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
</head>
<body>
<form id="form1">
<div ng-app=""
>
<label>Name:</label>
<input type="text"
ng-model="txtname"
placeholder="Please
enter name">
<hr>
<h1>Hello {{txtname}}!</h1>
</div>
</form>
</body>
</html>
|
Live
Demo
For
live demo enter your name to check
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
0 comments :
Note: Only a member of this blog may post a comment.