RequireJS和AngularJS [英] RequireJS and AngularJS

查看:196
本文介绍了RequireJS和AngularJS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我整合RequireJS和AngularJS。这是相当复杂的问题,我挣扎阐明了岗位#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

基本上,当我加载我的核心依赖与RequireJS角似乎编译页面,然后我的元素dissapear关闭页面。我不知所措。任何帮助将大大AP preciated!

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!

旁注:我不是建立一个SPA,所以在我的情况下,没有必要ngRoute。 这里的的许多TUTS的一个讨论(有点)我'想要做。

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关于使用AngularJS与RequireJS的有效途径。

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

<一个href=\"http://stackoverflow.com/questions/16108207/does-angularjs-support-amd-like-requirejs/21052364#21052364\">Does AngularJS支持AMD像RequireJS?

我看见你的视频和发现了一些不一致的地方,也是,你大呼过瘾AngularJS与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

希望它帮助。

这篇关于RequireJS和AngularJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆