• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
 

Spa with angular

on

  • 643 views

 

Statistics

Views

Total Views
643
Views on SlideShare
643
Embed Views
0

Actions

Likes
0
Downloads
8
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Spa with angular Spa with angular Presentation Transcript

    • Single Page Applications with Angular.js Danny Vernovsky dannyv@sela.co.il @dimkinv
    • Agenda • Why web applications are hard? • Angular.js, how to? (Movie lib) • Pros & cons • Q & A
    • Once upon a time...In 2005...
    • In 2013...
    • MV what? Model Controller View
    • Angular.js as a framework • Based on MVC pattern o application.controller('myCtrl') • Can extend HTML vocabulary o application.directive('myElement') • Injectables o function($scope, $myService) • Two way binding o {{model.firstName}}
    • Controllers • Controllers are just functions • Used to setup initial state with $scope • Used to setup behaivours
    • $scope • Holds the model • Provide API's (e.g $watch) • Connects between view and controller
    • Demo Hello Angular
    • Modules • No "main" method for application • Closed package code / reusable • No load order needed. application controllers services directives filters
    • Directives • All ng-* are directives!!! • Extends HTML with behaviour • Comes in various of flavors
    • Demo Movies Lib, Modules + Directives
    • Services • Can be declared as service or factory • Usefull for DOM/data manipulations • Lazy loaded into memory
    • Demo Movies Lib, Services
    • Filters • Best used to format expression. • Can be also used on collections • Angular.js built-in filters
    • Demo Movies Lib, Filters
    • Single Page Application • Routes are the core of SPA • Can respond to deep linking URLs with $routeProvider • Rendered templates appied into ngView directive
    • Demo Movies Lib, Complete Example
    • Lets sum up! Cons Takes freedom Errors not always visible Complex to master
    • Pros Framework brings order Very easy to start Very declarative By Google (here to stay) Based on known pattern Created with testability in mind
    • Whats next? Angular.js 1.2RC1 • ng-animate with predefined animations • ‘controller as’ – aliases for controllers • finally, ng-if • better error messages for debugging • better documentation • And much more
    • Questions?