angular


Tip and Trick

ng-app


  • bootstrap for angular

form validation


  • You can choose html5 validation or angular validation
  • novalidate
  • $dirty, $pristine, $valid, $invalid, $error
  • .ng-dirty.ng-invalid, .ng-pristine, .ng-dirty.ng-valid
  • ng-pattern
  • custom validation
  • dynamic form validation(ng-form)

apply & watch


  • $scope.digest() vs $scope.apply()
  • $watch & $watchCollection
  • $watch array
  • unwatch
  • performance
  • $scope.apply() vs $scope.apply(fn)

scope


  • controller & scope
  • prototype based inheritance
  • primitive type
  • avoid $rootscope
  • directive & scope
  • parent, child
  • $emit, $broadcast, $on
  • $destroy

basic directive


  • a
  • input
  • form
  • ng-option
  • ng-include

NG-REPEAT


  • filter
  • orderby
  • $index, $first, $last
  • implement rowspan

resource


  • wrapper for $http
  • deferred and promise
  • interceptor
  • cache

service


  • Dependency Injection
  • communication for controller
  • cookie
  • local/session storage, webSocket

INHERIT AND REUSE


  • angular controller
  • controller is based on DOM structure
  • call, apply

third party


  • angularstrap
  • angular-ui
  • restangular
  • debug

future


  • Object.observe
  • ng-repeat
  • ng-view
  • Web Componets & ploymer

angular

By odyss

angular

  • 2,361