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.
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
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
tabindex attribute and use
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.
I thought that is time for me to learn something else, something new from the Front-end world just to be on same wave with latest trends and to feed the brain with a different perspective. After all life is all about learning and in doing we learn.