-1

I'm integrating RequireJS and AngularJS. This is fairly complex problem and I'm struggling to articulate my problem in a Stackoverflow post, so here is a screencast of my issue. Sit back, relax, watch the weirdness..

http://goo.gl/02CGVe

Basically when I load my core dependencies with RequireJS Angular seems to compile the page and then my elements dissapear off the page. I'm at a loss. Any help would be greatly appreciated!

Sidenote: I'm not building a SPA, so there is no need for ngRoute in my case. Here's one of the many tuts that discuss (kinda) what I'm trying to do.

That1guyoverthr
  • 1,113
  • 2
  • 12
  • 19

1 Answers1

0

Actually, refer to this Stackoverflow question about an effective way of using AngularJS with RequireJS.

Does AngularJS support AMD like RequireJS?

I saw you video and found some inconsistencies and also, the way you hooked AngularJS with RequireJS is not ideal and kind of confusing. Refer to my post about hooking up both libraries in a consistent and effective way.

http://leog.me/log/large-angularjs-app-components

Hope it helps.

Community
  • 1
  • 1
leog
  • 778
  • 10
  • 15
  • That link you posted doesn't answer the question: how can you use RequireJS with AngularJS and still support testing? The answers from the post is saying - Yes its generally possible, with no examples, or backup whatsoever. I've tried - not the easiest thing to do. In the end I got it working, but abandoned it because it was more trouble than it was worth. – Michael Kang Dec 31 '14 at 03:12
  • I've read your blog post, I'd like to see a section on Testability, and not just theoretical examples. Give it a go and feel the pain:) In my opinion, any AMD framework that limits your ability to test your modules, is not worth it and wasn't meant to be. – Michael Kang Dec 31 '14 at 03:25
  • @pixelbits Actually, in the example application repo explained in that blog post, you can see a filter unit test on the spec folder (https://github.com/leog/epsilon/tree/master/spec). It's not difficult once you got the gist of it. I'm currently working on a very big AngularJS application with 1116 unit tests done that way. – leog Dec 31 '14 at 15:15