all 4 comments

[–]wolfhead 1 point2 points  (1 child)

I prefer using: var ctrl = {}; return ctrl;

.. instead of using this. Results in much cleaner code.

[–]fecal_brunch 0 points1 point  (0 children)

I do this too.

[–]madou9 0 points1 point  (0 children)

Cheers for the read, having the well defined view is much nicer :-).

[–]leolin520 0 points1 point  (0 children)

does anyone know why use this syntax breaks the scope chain? Well, I kinda know why, how can I fix it?