понедельник, 12 января 2015 г.

AngularJS UI Router Cheatsheet

Find the PDF file here: AngularJS UI Router Cheatsheet

четверг, 20 ноября 2014 г.

Webdev workflow schema

  • http://yeoman.io/ and install npm install -g yo
  • http://bower.io/ and install npm install -g bower
  • http://gruntjs.com/ and install npm install -g grunt-cli

воскресенье, 9 ноября 2014 г.

more AngularJS details

AngularJS scope and watch

1) $scope.$watch(VAR, CALLBACK)
2) $scope.$apply() - notify about changes
3) AngularJS scopes are organized in a tree structure and a scope can access its ancestor’s variables. Well, this means that $digest() needs to happen on every child scope in every iteration! Internally, this code is a bit messy in AngularJS, but each iteration of the $digest() loop does a depth-first search and performs the watcher check on every child scope. If any child scope is dirty, the loop has to run again!
4) UI is blocked while $digest() is running
5) angular.equals(A, B) - internal angular function for comparing

среда, 5 ноября 2014 г.

services and factories in angular explained

Compilation of very-very useful explanations for beginners what are services and factories and what are their key useful details. Credentials go mostly to stackoverflow.com threads.

Keep in mind all providers in AngularJS ( = value, constant, services, factories) are singletons !

If you want your function to be called like a normal function, use factory. If you want your function to be instantiated with the new operator, use service. If you don't know the difference, use factory.

среда, 10 сентября 2014 г.