AngularJS

HTML i.e. HyperText Markup Language was designed for static websites. When it was devised, we didn’t visualize the internet the way it is today. And hence HTML carries a lot of shortcomings for current web application development where displayed information is dynamic in nature. To overcome this shortcoming quite a few frameworks were developed. AngularJS is such a framework for dynamic web applications.

What is AngularJS?

It is a hybrid framework of HTML and JavaScript that simplifies building the web applications. It allows you to extend HTML’s syntax to express your application’s components clearly. It aims to simplify both development and testing of the application by providing client-side MVC architecture.

Design Goals:

  • to decouple DOM manipulation from application logic
  • to decouple client-side of the application from server-side.

This is a directive based framework, which facilitates a lot of functionality through the directives.

  • ng-animate – support for JS, CSS3 transitions and keyframes
  • ng-bind – sets the text of DOM element to the value of the expression.
  • ng-class – conditionally apply a class
  • ng-if – basic if statement.
  • and many more.

The AngularJS framework first reads the HTML page, which has the additional tag/directives embedded in it. It then interprets those tags to bind input and output parts of the page to the model. It can detect the changes to the model section and modifies the HTML expressions via a controller. It also keeps track of changes in the model by comparing current values and earlier values as part of “dirty-checking”.

Some of the advantages of AngularJS include:

  • No need for registering callbacks
  • No manipulation of DOM programmatically
  • No need of marshaling data to and from the UI
  • No need to write a lot of initialization code.

AngularJS was developed for applications based on CRUD operations. So applications such as games are not suitable to be developed using AngularJS.

Related Links

Related Keywords

TypeScript, Framework, Programming, JavaScript, Angular

 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.