RequireJS and AngularJS

久未见 提交于 2019-12-13 22:24:22

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/26056502/requirejs-and-angularjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!