requireJS 中的车把加载不成功
handlebars in requirejs load not successfully
paths: {
jquery: 'libs/jquery/jquery-min',
underscore: 'libs/underscore/underscore-min',
backbone: 'libs/backbone/backbone-optamd3-min',
handlebars: 'libs/handlebars/handlebars',
text: 'libs/require/text'
}
define([
'jquery',
'underscore',
'backbone',
'collections/todos',
'views/todos',
'text!templates/stats.html',
'common',
'handlebars'
], function ($, _, Backbone, Todos, TodoView, statsTemplate, Common, handlebars) {
//handlebars is null
console.log("handlebars is",handlebars);
})
除了车把,其他都可以成功加载。为什么以及如何使手柄杆成功加载。谢谢
首先,我可以看到你是新手,但请尝试在您的问题中添加更多详细信息以帮助其他人帮助您。
从源头来看,我认为车把与AMD不兼容,因此您需要自己填充它。像这样:
requirejs.config({
shim: {
'handlebars': {
exports: 'Handlebars'
}
}
});
相关文章:
- 如果数据为空,Ajax加载不会停止
- FileReader加载不在控制器范围Angular 2内
- requireJS 中的车把加载不成功
- 关闭-库加载不正确
- 弹出加载不起作用
- jQuery UI加载不正确?找不到对话框方法
- GULP中的Ctrl+S之后,实时重新加载不起作用
- 在解决Firebase GetRecord之前,视图加载不完整
- 网页加载不正确:'"JSON”;未定义'错误
- Jquery检查加载是否成功
- 加载不是来自“xampp的htdocs”或“root”文件夹的图像
- 阻止推特分享按钮加载不正确
- Durandal View偶尔加载不正确,而且总是在缩小时加载不正确
- 影子盒加载不起作用
- 传单显示悬停时的地图 - 地图加载不正确
- 余烬 CLI 实时重新加载不起作用
- 在Javascript中保存和加载不起作用
- 如何在 JSP 页面中编写 javascript 倒数计时器,以便重新加载不会重新启动计时器
- Fancybox2 无法加载.不需要冲突建议
- 如何在不重新加载页面的情况下加载支付成功消息