Angularjs + Requirejs [ Error Injection ]

Asked

Viewed 76 times

1

Introducing

I’m developing a structure using the Angularjs and Requirejs. I’m starting to study Requirejs and researched a lot about it, but I haven’t gotten anything clear from it using with the Angularjs.

Github Code

Problem [ Solved ]

I’m having trouble with my file dependency app/assets/app.json line 2. Removing angular dependency 'opaApp.application' it works perfectly. If you have any criticism to improve this structure you can speak.

Solution

I changed of define for require in app/assets/js/modules/Application/index.js

Problem 2 [ Update ]

Now with the dependency problem solved, my proejto sometimes runs the controller call and sometimes just hangs before. I kindly ask you to clone the repository and test and see that as vezes it will work.

Problem 2 [ Update 2 ]

The problem is only in google-Chrome. in firefox it runs round.

  • Do you have an error message? A comma is missing from define of Application/index.js

  • Sorry I ended up not correcting the comma after I moved it. I updated the repositorio there. Thanks @danguilherme. You can check now.

  • I was able to solve the dependency problem by changing define for require in app/assets/js/modules/Application/index.js, but I’m having trouble loading the module. See the update above.

  • I made two changes that worked: I put the normal Angular file, not the minified (line #4 main.js) and traded define for require, like you did in other places.

  • Opa, thanks @danguilherme for the reply, I made the same changes but I still have the same problem... That change of yours was made on top of my app?

  • Yes, I cloned it and ran it over an HTTP server.

  • Sorry, I actually removed line 6 from main.js as well!

  • @danguilherme can give a pull request for me ?

  • Dude, now I can’t, but I pasted my code exactly like I tested it here: http://pastebin.com/H64Nh1yJ (main.js was the only thing I changed anyway). I will be a while without internet, so if I do not answer is because I did not see.

  • Here I noticed that it works perfectly in the firefox and in the google chrome not.

Show 5 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.