What's AngularJS?

AngularJS, is a client-side JavaScript framework designed for Single Page Application

Why AngularJS?

Stats
AngularJS BackBone.js
GitHub Contributors 1,062 240
Third-Party Modules 800 ngmodules 236 backplugs
StackOverflow 62,797 16,678
Library Size 111kb 60 kb + JQuery + Underscore

Growing

YOU
STILL
ASK
WHY?
TWO WAY
DATA BINDING

One-way data binding

BackBone.js

V.S.

Two-way data binding

AngularJS

Name:
Hello {{input}}

WHY

  • Less DOM manipulation
  • Less code
  • Less Bugs

HOW

But...

As $scope grow

  • Slow performance

Solutions:

  • Use in small data set
  • Use $apply to start or stop $scope
  • Use BackBone.js

Templates
&
Directives
ngRepeat

The ngRpeat loops over a collection of data. The same as for-loop

  • {{elm | uppercase}}
Filter
  • filter Selects a subset from collection
  • currency Convert decimal to local currency
  • orderBy Arrange data base on expression
Search:
  • {{elm | uppercase}}

No need for

Dependency
Injection

Dependency Injection Provide:

  • Reusable Code between programs
  • Simpler dependency resolution via DI
  • Single responsibility principle
Testing

WHY

  • Less Debugging
  • No Blaming
  • Increasing Productivity
  • AngularJS is built with testing in mind

Unit & End-End Testing

  • Code Logic
  • User interface
  • Automation

TEST FOR ALL

Thank You!

Questions...