[Sugar-devel] sugar-web - How to load non-AMD js modules / libs?

Code iraguet at activitycentral.com
Fri Nov 1 17:02:28 EDT 2013


Hello, list!
I'd like to add a non-AMD lib (AngularJS in this case) to my activity.

Here only points out how to add AMD ones:
http://developer.sugarlabs.org/activity.md.html#using%20other%20javascript%20libraries

Of course there are workarounds like adding script tags (I'd rather not) or
setting up the "shim" option from RequireJS config...
https://github.com/code-sur/web-activity-POC/blob/master/js/loader.js

But it seems that I shouldn't be touching the loader.js file, isn't it?

Is there a standard/preferred way to achieve this?


Thanks,
Code
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20131101/2ae9210f/attachment.html>


More information about the Sugar-devel mailing list