您好我尝试重新创建Golden Layout角度复杂应用程序https://golden-layout.com/tutorials/angular-complex.html作为电子应用程序,所以基本上我只是做了电子http://electron.atom.io/docs/latest/tutorial/quick-start/的快速启动示例并完成了所有的黄金逻辑我的index.html上的布局,但它发送给我这个错误:
缺少jQuery作为GoldenLayout的依赖项。请在GoldenLayout的范围(例如窗口)上公开$或添加" jquery"使用RequireJS / AMD时的路径
答案 0 :(得分:2)
如this answer中所示,您需要以下列方式加载jquery(在包含golden-layout之前):
<script>window.$ = window.jQuery = require('./path/to/jquery.js');</script>
如果我理解正确,则会出现此问题,因为jquery'检测到'它在requireJS环境中运行并在$
中加载jQuery
和modules
(而不是window
)