Angularjs - Hello World!


What is Angularjs?

AngularJS is a javascript framework which helps build web and mobile application. It is one of the projects developed by Google Inc. It is the widely used client side scripting language.

Google has made this project opensource which mean the source code is available for all. It can be re-modified and used for other projects. It is best fit for SPA (Single Page Application), MVC framework web application etc..,

Visit website Made With Angular (Click Here) to know the top websites which uses Angular JS.

Talking about benefits of Angular JS:
  1. Dependency Injection
  2. Two Way Data-Binding
  3. Testing
  4. ModelViewControler
  5. Directives, Filters etc.,
To get started you need to have angular.js file added to your project. You can download the file or use the CDN link.

Download AngularJS version 1.5.5 file from here

Google CDN Minified : https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js
Google Uncompressed : https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.js

Why Google CDN?

While downloading and using the AngularJS source code is great for development, we recommend that you source the script from Google's CDN (Content Delivery Network) in your deployed, customer facing app whenever possible. You get the following advantages for doing so:

Better Caching : If you host AngularJS yourself, your users will have to download the source code atleast once. But if the browser sees that you are referring to Google CDN's version of AngularJS, and your user has visited another app which uses AngularJS, then he can avail the benefits of caching, and thus reduce one download, speeding up his overall experience!

Decreased Latency : Google's CDN distributes your static content across the globe, in various diverse, physical locations. It increases the odds that the user gets a version of AngularJS served from a location near him, thus reducing overall latency.

Increased Parallelism : Using Google's CDN reduces one request to your domain. Depending on the browser, the number of parallel requests it can make to a domain is restricted (as low as 2 in IE 7). So it can make a gigantic difference in loading times for users of those browsers.


Angular example:











AngularJS starts automatically when the web page has loaded.

The ng-app directive tells AngularJS that the <div> element is the "owner" of an AngularJS application.

The ng-model directive binds the value of the input field to the application variable name.

    The ng-bind directive binds the innerHTML of the <p> element to the application variable name.

1 comment:

  1. Really a great post. This was really an amazing content which is really helpful for me to attain the javascript technique in the right way. Thanks a lot for offering this unique content with us.

    Dotnet Training in Chennai

    ReplyDelete

Recent Posts