Angling in on angularjs


Andy Joslin
@andytjoslin
github.com/ajoslin


what?


  • It's a javascript framework

  • It just went 1.2.0rc1

  • Been in development since '09

  • Version 1.0 released 18 months ago

OK, SHOW ME

Why angularjs?


  • Javascript or even jQuery aren't enough anymore

  • Server-side apps aren't enough anymore

  • We need structure on the client

angularjs is definitely structurey


  • Angularjs calls itself MVW

  • Controllers, services, directives

  • Controllers bind data from the DOM to your business logic

  • Services are boxes to write your business logic in

  • Directives teach html new tricks to present data easily

let's make a controller

DIRECTING YOU TOWARDS
DIRECTIVES

  • Directives let you "teach html new tricks"

  • Put your reusable logic into an <element>

Let's make a directive

services: you got served


  • Modular boxes to put business logic in

  • Put any reusable business logic in here, and let your controller use it

let's make a service

Get an angle on more

 angular goodies...


  • Dependency injection is built-in

  • Your code is modular

  • Your code is testable

  • It's not just data-binding: it's everything you need for a web-app

Let's make a test

That's all folks



Questions? 
Comments? 
Concerns? 
Compliments?

Angling in on angularjs

By Andy Joslin