Fixes the AngularJS directive.