bing
Flat 10% & upto 50% off + Free additional Courses. Hurry up!

AngularJS First Application

 

An AngularJS application consists of following three main parts −

  • ng-app− Defines and links application to HTML.
  • ng-model− Binds the values of application data to HTML input controls.
  • ng-bind− Binds the Application data to HTML tags.

 

Steps to create AngularJS Application

Step 1: Load framework

It is done by using <Script> tag.

<script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js">

</script>

Step 2: Define Application using ng-app directive

<div ng-app = "">

//code

</div>

Step 3:  Define a model name using ng-model directive

<p>Enter Text: <input type = "text"  ng-model = "name"></p>

Step 4: Bind the value of above model defined using ng-bind directive.

<p>Hello<span ng-bind = "name"></span></p>

 

Example: Hello Program in AngularJS

<html>

<head>

<script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>

<title> Welcome AngularJS </title>

</head>

<body>

<h1> Hello Program in AngularJS </h1>

<div ng-app = "">

<p>Enter Text:<input type = "text" ng-model = "name"></p>

<p>Hello <span ng-bind = "name"></span></p>

</div

</body>

</html>

Save this file as HelloAngularJs.html and run in web browser.

Output

output2

"0 Responses on AngularJS First Application"

Training in Cities

Bangalore, Hyderabad, Chennai, Delhi, Kolkata, UK, London, Chicago, San Francisco, Dallas, Washington, New York, Orlando, Boston

100% Secure Payments. All major credit & debit cards accepted Or Pay by Paypal.

top

Sales Offer

  • To avail this offer, enroll before 05th December 2016.
  • This offer cannot be combined with any other offer.
  • This offer is valid on selected courses only.
  • Please use coupon codes mentioned below to avail the offer
offer-june

Sign Up or Login to view the Free AngularJS First Application.