Angularjs
Sun, Feb 1, 2015

Use whenever you can compile to boost your Angular directives and get rid of whatchers. For instance we have a directive which acts as a data row in a ngRepeat, like a grid row. Only besides the trivial columns this row has some action buttons.


Sun, Mar 2, 2014

In case if your controller became too large and the inheritance is not a solution, the Mixin pattern can solve this problem very easy by splitting the logic in mixins each serving a functionality or a feature. Within AngularJS I found a easy to do it by using the $controller service.


Fri, Jan 24, 2014

Often is needed to close a popup when the user clicks anywhere else in the page but not on popup. There are many workarounds for such functionality, including one of the simplest which is to give to the div the tabindex attribute and use onblur event.

But onblur wasn’t suitable for me because is fired only if the popup have got the focus, and the user may want to close that popup without giving the focus to it.