I have a small angular app that just has one directive.
It will be used on many other websites, simply by them including one JS file and then using the directive anywhere on their page.
The problem is that if I try to do this on a site that happens to also use angular, I get the classic
WARNING: Tried to load angular more than once.
This is because angular loads itself on the global namespace.
I have tried messing with the angular.js code, doing find-and-replace on instances of things like:
angular = window.angular || (window.angular = {})
to
angular = window.angularXYZ || (window.angular = {})
But it didn't work and it seems very hacky.
Any ideas for namespacing an entire angular app so that it can play nicely when initialized from within other angular apps?