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.
Problem [ Solved ]
I’m having trouble with my file dependency app/assets/app.js
on 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
ofApplication/index.js
– danguilherme
Sorry I ended up not correcting the comma after I moved it. I updated the repositorio there. Thanks @danguilherme. You can check now.
– ralfting
I was able to solve the dependency problem by changing
define
forrequire
inapp/assets/js/modules/Application/index.js
, but I’m having trouble loading the module. See the update above.– ralfting
I made two changes that worked: I put the normal Angular file, not the minified (line #4 main.js) and traded
define
forrequire
, like you did in other places.– danguilherme
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?
– ralfting
Yes, I cloned it and ran it over an HTTP server.
– danguilherme
Sorry, I actually removed line 6 from main.js as well!
– danguilherme
@danguilherme can give a
pull request
for me ?– ralfting
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.
– danguilherme
Here I noticed that it works perfectly in the
firefox
and in thegoogle chrome
not.– ralfting