How to create first application in AngularJS

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.

Watch this What is Angular 8 video

AngularJS First Application

Steps to create AngularJS Application

Step 1: Load framework
It is done by using <Script> tag.

<script src = "">

Step 2: Define Application using ng-app directive

<div ng-app = "">

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

<script src = ""></script>
<title> Welcome AngularJS </title>
<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>

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

Learned to create your first application on AngularJS? Head onto to create a shopping cart using AngularJS.

Course Schedule

Name Date
Web Development Courses 2021-10-23 2021-10-24
(Sat-Sun) Weekend batch
View Details
Web Development Courses 2021-10-30 2021-10-31
(Sat-Sun) Weekend batch
View Details
Web Development Courses 2021-11-06 2021-11-07
(Sat-Sun) Weekend batch
View Details

Leave a Reply

Your email address will not be published. Required fields are marked *