Angular Fun



By BAS
(Basarat Ali Syed)

You are not alone


http://goo.gl/vhFvq

AngularJS Docs are terrible



I'm kidding 
I'm totally not kidding

Conceptual Overview



Link



Baby sTEPs



http://plnkr.co/edit/8ysxlUrN7wG4TA23WG4l?p=preview

http://plnkr.co/edit/9KpIesuBO5scjSdfWCMu?p=preview




Controllers AND Scope


http://plnkr.co/edit/G1N9Pm1wmvHZsQl5m5Lf?p=preview



http://plnkr.co/edit/VwaBdW9f2FDhLx7dxTQp?p=preview


Directives


Look at all that angular provides you out of the box.

http://docs.angularjs.org/


Directives




Already seen examples of these 

Directive Create your own



http://jsfiddle.net/basarat/D3bFB/

The complete Definition options


http://docs.angularjs.org/guide/directive#directivedefinitionobject

Dependency Injection AND Modules

http://docs.angularjs.org/guide/module




DI Syntax


minification syntax : http://docs.angularjs.org/guide/di

Sample service Injection


Implicit module 'ng' added to all angular modules.

http://docs.angularjs.org/api/ng.$http#Example

Sample Service


Reusable functionality for our Controllers

http://plnkr.co/edit/eZoqPa?p=preview

Filters


Sit Between (Controller - View) 

http://jsfiddle.net/basarat/25XVf/

Look Back

Modules 
App Module
 (View - scope - Controllers) 
Directives 
Filters 
Services

Links Again

http://docs.angularjs.org/guide/
http://docs.angularjs.org/api/

Really is that simple


A bit of the internals

Angular Expressions


http://docs.angularjs.org/guide/expression



$Watch

The way $compile works 


http://docs.angularjs.org/api/angular.copy
http://docs.angularjs.org/api/angular.equals

Digest

Services / Factories Are singletons



Routes


http://docs.angularjs.org/api/ng.$route#Example

Async


http://docs.angularjs.org/api/ng.$q


http://plnkr.co/edit/5Jbwol6NC99mBtara10J?p=preview
Made with Slides.com