directive fix and angular 1.3 complete migration