I'm trying to build a JavaScript widget that will allow webmasters to just cut and paste a few lines of code to display some functionality and UI on their site.
I've seen a good example of doing this kind of thing in JQuery, but not Angular. I'm assuming the widget will need to download the angularjs javascript file conditionally (based on whether it has already been loaded).
Has anyone had experience doing this in Angular and can recommend whether or not to do it in Angular or just stick with jQuery?
e.g. FourSquare's widget code: Save to foursquare
<script type='text/javascript'>
(function() {
window.___fourSq = {"uid":"606"};
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'http://platform.foursquare.com/js/widgets.js';
s.async = true;
var ph = document.getElementsByTagName('script')[0];
ph.parentNode.insertBefore(s, ph);
})();
</script>