AngularJS Beginner Tutorial

Updated on     Kisan Patel

AngularJS is a client-side JavaScript framework, maintained by Google. It make the development of web apps easier and faster.

AngularJS is an MVW framework (Model-View-Whatever) where Whatever means Whatever Works for You. The reason is that AngularJS can be used both as Model-View-Controller (MVC) and Model-View-View-Model (MVVM) framework.


AngularJS Features:

  • Separation of application logic, data models, and views
  • Routing Support
  • Templating
  • Enhanced user experience with form validation
  • Ajax services
  • Dependency injection
  • Browser history (makes bookmarking and back/forward buttons work like normal web apps)

Adding via CDN

AngularJS can be added to a web page with a script tag in the <head> of your HTML.

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

In addition to the main script above, there are several extra Angular scripts with additional functionality:

  1. angular-route.js: Adds routing support. As we will be building a real-world
    single-page app in the book we will need this.
  2. angular-animate.js: This is useful for creating nice CSS3 animations.
  3. angular-mocks.js & angular-scenarios.js: This is useful for testing purposes.
  4. angular-sanitize.js: Functionality to sanitize HTML
  5. angular-resource.js: Provides better support for interacting with REST APIs.
  6. angular-touch.js: Touch events and other helpers for touch-enabled devices
  7. angular-cookies.js: A convenient wrapper for reading and writing browser cookies

AngularJS Example

Above demo show one of the most basic and impressive features of AngularJS: data binding.

angularjs-hello-demo-1


AngularJS

Leave a Reply