使用dojs与dojo 1.9.1 [英] Using requirejs with dojo 1.9.1

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

问题描述

任何人都可以提供一个简单的例子来说明如何使用requirejs来加载dojo模块?



requirejs.org网站表示最好使用dojo加载程序,直到票已解决 - 但该票似乎已解决,现已关闭。



我遇到错误,如<这里描述的href =https://stackoverflow.com/questions/14711102/using-dojo-1-8-with-requirejs>(现在重复)现在只有dojo 1.9.1。



错误:


TypeError:_3.add不是一个函数
_3 (dom-addeventlistener,!! document.addEventListener);


(我现有的骨干应用程序使用requirejs我只是试图整合dojo图表)。

解决方案

您需要使用源/ SDK版本的Dojo Toolkit。 AMD模块的内置副本在装载程序之间不兼容。


Can anybody provide me with a simple example of how to use requirejs to load dojo modules?

The requirejs.org website indicates it is best to use the dojo loader until a ticket is resolved - but that ticket appears to be resolved and is now closed.

I am encountering errors such as described here (duplicated below) only now with dojo 1.9.1.

Error:

TypeError: _3.add is not a function _3.add("dom-addeventlistener",!!document.addEventListener);

(I have an existing backbone app that uses requirejs and am simply trying to integrate in dojo charting).

解决方案

You need to use the source/SDK version of the Dojo Toolkit. Built copies of AMD modules are not compatible between loaders.

这篇关于使用dojs与dojo 1.9.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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