• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » AngularJS » AngularJS Hello World Application
Next →
← Prev

AngularJS Hello World Application

By Dinesh Thakur

In this section we are going to look had a build this simplest Hello Word Application with possibly can use Angular. My Goal here is want end up the page put the H1, this is Hello World in it, and want using angular to display the message. So, First thing we can do to include the Angular Script on the Basic HTML page.

<script type=”text/javascript”

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

Now we need to create a controller. The Controller is defining by creating a function in the script tag. You can see the name this function CtrlHello. Then give this function primer called scope with the dollar sign. This is the special primer that angular uses in order to pass data in between the controller and the view.

        <script type=”text/javascript”>

         function CtrlHello($scope) {

         $scope.HelloMessage = “Hello World”;

           }

         </script>

Now we are create H1 tag on the page to display Hello World message. In angular message place holder is start and stop with double curly braces. The expression is shown in bold form below. I tell Angular the h1 is control by the controller so I can declare controller name ng-controller in the h1 tag. ng is short for angular.

//<h1 ng-controller =”Name of Controller” > {{Message to Display}}!</h1>

     <h1 ng-controller =”CtrlHello” > {{HelloMessage}}!</h1>

 

So sum up of all the above code is below , that will show Hello World message in the Browser.

<!DOCTYPE html> 
  <html lang="en" ng-app>
  <head>
       <title>Hello World </title>
       <script type="text/javascript"
          src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
  </head>
  <body>
         <h1 ng-controller ="CtrlHello" > {{HelloMessage}}!</h1>
         <script type="text/javascript">
         function CtrlHello($scope) {
         $scope.HelloMessage = "Hello World";
           }
         </script>
        
   </body>
</html>

The output of the above code is

      Hello World!

You’ll also like:

  1. The First AngularJS Application
  2. What is AngularJS?
  3. AngularJS MVC Architecture
  4. How to install AngularJS
  5. What is Application Program and application software?
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

AngularJS Tutorials

AngularJS Tutorials

  • AngularJS - Home
  • AngularJS - MVC Architecture
  • AngularJS - Installation
  • AngularJS - Hello World
  • AngularJS - First Application

Other Links

  • AngularJS - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW