Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Angularjs Basics

1,509 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Angularjs Basics

  1. 1. Isn’t that all you need ?
  2. 2. • Pure JS (no JQuery) • MVC framework • Dependency Injection • There are no Observables objects/Properties • Encourage to write unit testable code
  3. 3. Basic Concepts • Model - application data • View - what the user sees • Controller - application behavior • Scope - glue between application data and behavior • $ - angular namespace ($$ is private ) • Module - configures the injector • Injector - assembles the application
  4. 4. Data Binding Write an interactive app without using custom JavaScript Few directives • Define data in the view itself ng-init • Initialize the application ng-app • Two way binding ng-model
  5. 5. Expressions {{ expression | filter }} expression - access variables and functions from the scope filter - formats the value of an expression for display to the user
  6. 6. Controllers • The UI Logic • Use of ng-controller
  7. 7. Services • View independent business logic • Share common logic across controllers • Lazily instantiated • Singletons • Built in services - $http, $compile, $q
  8. 8. References • https://www.youtube.com/watch?v=i9MHigUZKEM • https://docs.angularjs.org/guide/concepts • http://stackoverflow.com/questions/tagged/angula rjs

×