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