Now works with angular 1.3.x