Intro image

Basic Intro

AngularJS is javascript framework, which is powerful and used for single page applications, and it's officially supported by Google.

View details »

Features image

Features

MVC Framework, AngularJS extends HTML, Scope, Controller, Services, Two Way Data-Binding, Dependency Injection, Directives, Testing.

View details »

Generic placeholder image

Advantages

With AngularJS, developer write less code and get more functionality, AngularJS applications can run on all major browsers and smart phones.

View details »

  • {{x}}

AngularJS Expressions

AngularJS expressions can be written inside double braces {}.
AngularJS expressions can also be written inside a directive: ng-bind="expression".
AngularJS will resolve the expression, and return the result exactly where the expression is written.

Let we set ng-init="quantity=5;cost=5"!
Know we can check Total using "{'{ quantity * cost }'}"

Total in dollar: {{ quantity * cost }}

AngularJS Strings-AngularJS strings are like JavaScript strings: we pass inside div attributes ng-init="firstName='John';lastName='Doe'"

So the output name is {{ firstName + " " + lastName }}

Angular Image

Angular Modules.

An AngularJS module defines an application.
The module is a container for the different parts of an application.
The module is a container for the application controllers.
Controllers always belong to a module.

Check "script.js" file for more information.
The Name is {{ firstName + " " + lastName }}.

We can make our own Directive,Check "script.js" file for more information.
The ng-app directive initializes an AngularJS application.
The ng-init directive initializes application data.
The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
Angular Image

Two-way Binding

Data binding in AngularJS is the synchronization between the model and the view.
When data in the model changes, the view reflects the change, and when data in the view changes, the model is updated as well. This happens immediately and automatically, which makes sure that the model and the view is updated at all times.

Name:

{{firstname1}}

Angular Services:-1 $location, 2 $http Service, 3 $timeout Service, 4 $interval Service

This header will change after five seconds:

{{myHeader}}

The time is:

{{theTime}}

The $interval service runs a function every specified millisecond.

500x500

AngularJS AJAX - $http

$http is an AngularJS service for reading data from remote servers.
The AngularJS $http service makes a request to the server, and returns a response.

The server send Following Employee Name, using $http Service:

  • {{x.name}}
Angular Image