Angular.js in Single Page Application

In this blog, I’m explaining the angular.js.                                                                           AngularJS is a MVC framework that defines numerous concepts to properly organize your web application. Your application is defined with modules that can depend from one to the others. It enhances HTML by attaching directives to your pages with new attributes or tags and expressions in order to define very powerful templates directly in your HTML. It also encapsulates the behavior of your application in controllers which are instantiated thanks to dependency injection. Thanks to the use of dependency injection, AngularJS helps you structure and test your JavaScript code very easily. Finally, utility code can easily be factorized into services that can be injected in your controllers. Now let’s have a closer look at all those features.

AngularJS is ideal for use when building client-side single-page apps. It is not a library, but a framework for building dynamic web pages. It focuses on extending HTML and providing dynamic data binding, and it plays well with other frameworks (e.g., jQuery).

If you are building a single-page app, AngularJS will be perfect for you. Gmail, Google Docs, Twitter and Facebook all fit into the AngularJS sweet spot. Game development and other apps that heavily manipulate the DOM or need pure speed are not good fits for AngularJS.

An Angular template is the declarative specification that, along with information from the model and controller, becomes the rendered view that a user sees in the browser. It is the static DOM, containing HTML, CSS, and angular-specific elements and angular-specific element attributes. The Angular elements and attributes direct angular to add behavior and transform the template DOM into the dynamic view DOM.

These are the types of Angular elements and element attributes you can
use in a template:
  • Directive —Directives are one of the most powerful feature of AngularJS. They allow you to extend HTML to answer the needs of web applications. Directives let you specify how your page should be structured for the data available in a given scope.

An attribute or element that arguments an existing DOM element or represents a reusable DOM component - a widget.

  •  Markup — The double curly brace notation {{ }} to bind expressions to elements is built-in angular markup.
  • Filter — In order to change the way your data are displayed in your page, AngularJS provides you with the filter mechanism. It formats your data for display to the user. You can also easily create your own filters.
  • Form controls — Lets you validate user input.
Last updated:9/18/2014 1:24:19 PM


Leave Comment