make directive minification friendly

Annotate the directive function so that it works even if the javascript is minified.