Javascript



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.



Mon, Sep 23, 2013
Though aren’t widely used SVG Patterns are very powerful and light. Being vector graphics, a pattern adjusts very well to any screen resolution making the background crisp and nice. The only drawback would be is the lack of support on IE8 and lower and yes the lack of support in ExtJS 4.2.1 (and lower) too. Hopefully next versions of ExtJS will have within its SVG engine the needed piece which would allow us to add and use patterns in our ExtJS web apps.

Sat, Sep 7, 2013
Though ExtJS charts are very rich in features sometimes our clients want more. Very often they want some specific features which in the end leads to adding new custom sprites to the charts. And ExtJS is ready to help us with the needed tools to accomplish those features and make the client happy. In this post I’m going to add some light on how to add custom sprites in ExtJS charts based on a real world example.

Sat, Jun 22, 2013

Below my short journey in taking a look to NVD3 and Raphael as alternative charting libraries for Sencha Touch(ST). ST has a powerful and nice charting library which is included as a part of Touch (available as GPLv3 or as a part of Sencha Complete and Complete: Team). Yet I’ve wanted to try other charts libs with a more flexible license which will allow me to integrate them easily in a ST app and develop a simple line chart ST component.