问题描述
在 Meteor 应用程序中安装 jQuery UI 的正确方法是什么?由于它还不是一个包,我将下载中的 jquery-ui.min.js 和 jquery-1.8.3.js 添加到我的流星项目的 lib
文件夹中.这导致了以下致命错误:
What is the correct way to install jQuery UI in a Meteor application? Since it's not a package yet, I added the jquery-ui.min.js and jquery-1.8.3.js that came in the download into the lib
folder in my meteor project. That is causing the following fatal error:
Your app is crashing. Here's the latest log.
app/lib/jquery-1.8.3.js:9472
})( window );
ReferenceError: window is not defined
at app/lib/jquery-1.8.3.js:9472:5
(.........)
Exited with code: 1
Your application is crashing. Waiting for file change.
推荐答案
我实际上已经添加了一个 jquery-ui 陨石包,你可以安装
I have actually added a jquery-ui meteorite package that you can install
mrt 添加 jquery-ui
注意这个包是 1.8.16 版,是 jquery-ui-bootstrap 包,如果安装,将自动包含 jquery-ui
和 bootstrap-updated
智能包.(所有这些都让 bootstrap 和 jquery-ui 很好地结合在一起).
Note this package is version 1.8.16 and is a dependency of the jquery-ui-bootstrap package which, if installed, will automatically include the jquery-ui
and bootstrap-updated
smart packages. (All of which make bootstrap and jquery-ui play nicely together).
要安装所有东西,您可以使用:mrt 添加 jquery-ui-bootstrap
To install everything, you can use:mrt add jquery-ui-bootstrap
这篇关于我如何在流星中使用 jQuery UI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!