fix(directive): updated directive to work with angular 1.2