Monday, June 30, 2014

Angular Js from the basic

     There are numerous frameworks in the market for mobile/web apps. Along with Sencha Touch/EXTJs, Angular Js is also become popular. Both have their pros/cons,which we shall discuss once we grasp Angular.

The Angular Js documentations and the tutorial itself is great for anybody to learn Angular js. All those who know Flex, and are quite familiar with the UI principles in general, learning AngularJs will not be that difficult. It's just a matter of syntax and knowing the available directives. You have to be good at Templates :).

A typical angular js app looks like:

<html lang="en" ng-app=""></html>
<head></head> ..
<!--incude css --> <script --="" src="...path to angluar js source"> </head> <body> </body> </html>

Understanding the ng-app directive is very important. It basically flags that element to be the root of our app. When you include the Angular source, after the entire containing html is downloaded, Angular js will search for the ng-app directive and will bootstrap the app with that element as the root of the app.

Basically bootstrapping the app consists of 3 steps:

1. Injector for Dependency Injection is created

2. Injector creates the root scope

3. Angular compiles the DOM starting at the ngApp root directive

This entire process is explained in the Angular Js tutorial and is the basis for learning it. Once the Basics are clear the framework is easier to grasp :)...

Hope we all enjoy developing in Angular js. Will come back with great tips and shortcuts in a few weeks, once I get a thorough grasp over the framework.