pTutorial

New way to learn Programming

Step By Step Angularjs App

Steps to start creating AngularJS Based Web Application-

As you already know AngularJS is JavaScript framework, it is a library based written in JavaScript.

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

Just copy and paste the above line into the head section and use the functionality of the AngularJS.

Note:- In the above case your System must be connected to the Internet.

For Offline use

Just copy the URL and paste it into the URL bar of the browser.

Copy complete code paste into the text editor and save it with any name (preferred angular.min.js).

Call this script in the head section with proper directory structure with <script> tag see the below example.

<script src="angular.min.js"></script>>

Note:- In my case the angular.min.js file located on the same folder.

Ofline Example

<!DOCTYPE html> 
<html lang="en-US">
<script src="angular.min.js"></script>>
<body>
<div ng-app="">
  <p>Enetr Name : <input type="text" ng-model="name"></p>
    <p style="color:red";>Hello {{name}}</h2></p></p>
</div>
</body>
</html> 

The AngularJS Components

There are three main component of AngularJS are following below -

  • ng-app − This directive defines AngularJS based web application to HTML.
  • ng-model − This directive binds the values of AngularJS application data to HTML input controls.
  • ng-bind − This directive binds the AngularJS Application data to HTML tags.

See Also


QUOTES OF THE DAY

Each day provides its own gifts.

LIKE ON FACEBOOK

+1 ON GOOGLE

SHARE ON TWITTER