Useful directive for Angular.js