Converted to module

Thanks for this very useful directive.  

This PR converts the directive into a module.  I think it's better to rely on AngularJS's built-in module/DI system, rather than have a RequireJS dependency.

Let me know what you think.