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

4
  • Did u try npm install mona-parser? Commented Apr 5, 2015 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. Commented Apr 5, 2015 at 14:09
  • Have you look at this article: stackoverflow.com/questions/12529083/…? There is a video from ngconf where Thomas Burleson talked exactly about this. Commented Apr 5, 2015 at 14:31
  • what solution did u chose ? @bobby Commented Nov 9, 2018 at 11:16

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.