Tuesday, December 8, 2015

Hello World Program for AngularJs

Hello Angular Program for AngularJs.

When you are starting Programming with AngularJS at that time You need two things which is mentioned Below.
1) Angular java script file(angular.js)
2) And second thing you have to mention ng-app into <html> Tag.

Below is Hello Angular Program.

HelloAngular.html :-

<!DOCTYPE html>
<html ng-app>

  <head>
    <script data-require="angular.js@*" data-semver="1.3.0-beta.5"
            src="https://code.angularjs.org/1.3.0-beta.5/angular.js">

     
    </script>
    <link rel="stylesheet" href="style.css" />
    <script src="script.js"></script>
  </head>

  <body>
        Hey THis is just the Beginning of AngularJS.
  </body>

</html>

Script.js :-
    Alert("Hello Angular");

After Execution of above Program You will Get Below Result.






For Further Knowledge of AngularJS stay tuned with visionfortech.blogspot.com.
Thanks.

2 comments:

  1. Wow...very nicely explained..simple and self explanatory...but for the beginners you need to specify that the script.js file will be in same directory under which the source file is...

    ReplyDelete

Protected by Copyscape