The magical vertical_align

7 בדצמבר 2014

CSS is a nightmare ... Most web developers I know hate to fix/touch their CSS Have you ever had the chance to play with the vertical_align property? There are cases where you change the vertical_align property of one element but it actually effects another one. There are many blogs/posts about the common misconception of using vertical_align but none of them explain the internals of it. At last, I found a serious designer which decided to deep dive into W3C specification and explain the full picture. His name Christopher Aue. Click here to read his post Be aware, it is not fun ...
no comments

Angular 1.3 – Creating a controller

5 בדצמבר 2014

In one of my Angular projects I needed to control the way a controller is instantiated By default, the developer specifies the controller name inside the HTML or inside a route configuration and then Angular instantiates the controller. Suppose I want to the instantiate the controller my self and return it to Angular Well, this should be quite easy angular.module("MyApp").controller("HomeCtrl", function () {     function HomeCtrl() { = "Ori";     }     HomeCtrl.prototype.sayHello = function () {         alert(;     }     return new HomeCtrl(); }); As you can see, I am not registering a JavaScript constructor but rather use anonymous function and then return a new controller object. Running this code under Angular 1.2 completes without any issue However, when switching to Angular 1.3 i noticed that all controllers instantiated this...