4

I am having troubles using a module in my angularjs application. After looking on dozens of sites about AngularJS & RequireJS, I am looking for help as I think it should be simple...

I would like to use the following script in my angularJS app. http://zkat.github.io/mona/index.html

As I understood, mona is a script that uses the commonJS module pattern with "module.exports()".

When I try to use in my AngularJS app: "var mona = require('mona');"

It fires the exception: "Error: Can't find variable: require"

I looked over several sites on integrating commonJS or requireJS with AngularJS, but did not find a simple solution (use browserify? but I did not find the right way)

Maybe I missed something or maybe I've been in totally in the wrong way. Thanks if you can tell me where to look for.

Best regards

bobby
  • 674
  • 3
  • 10
  • 14
  • Did u try npm install mona-parser? – Ashish Musale Apr 05 '15 at 14:05
  • There are no simple solutions for integrating RequireJS with AngularJS. There are moderately ugly solutions. You just have to live with it if you want both. – Rex M Apr 05 '15 at 14:09
  • Have you look at this article: http://stackoverflow.com/questions/12529083/does-it-make-sense-to-use-require-js-with-angular-js? There is a video from ngconf where Thomas Burleson talked exactly about this. – Jimmy Chandra Apr 05 '15 at 14:31
  • what solution did u chose ? @bobby – julio Nov 09 '18 at 11:16

0 Answers0