Angular service and directive for basil.js