【问题标题】:Ember issue: Uncaught Error: Could not find module handlebarsEmber 问题:未捕获的错误:找不到模块把手
【发布时间】:2014-06-18 03:04:17
【问题描述】:

index.html

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Let's learn Ember.js</title>
        <script src="jquery-1.10.2.js"</script>
        <script src="handlebars-1.1.2.js"</script>
        <script src="ember-1.5.1.js"</script>
        <script>
            window.App = Ember.Application.create();
        </script>
    </head>
    <body>
        <script type="text/x-handlebars" data-template-name="index">
            <h1>Welcome to Ember.js!</h1>
        </script> 
    </body>
</html>

jquery、handlbars 和 emberindex.html 位于同一文件夹中。

当我在 Chrome 中打开 index.html 时(浏览器的地址行看起来: file:///home/askar/work/ember/emberjs/index.html ),在 Inspect Element I 的 Console 选项卡中我得到错误:

Uncaught Error: Could not find module handlebars ember-1.5.1.js:251
requireModule ember-1.5.1.js:251
(anonymous function) ember-1.5.1.js:27031
(anonymous function) ember-1.5.1.js:27317
(anonymous function) ember-1.5.1.js:44267

我做错了什么?

找不到任何相关帖子。

【问题讨论】:

    标签: javascript jquery html ember.js handlebars.js


    【解决方案1】:

    这是因为您的脚本标签缺少右尖括号。

    试试这个:

    <script src="jquery-1.10.2.js"></script>
    <script src="handlebars-1.1.2.js"></script>
    <script src="ember-1.5.1.js"></script>
    

    【讨论】:

    • 真丢脸! :) 那是微不足道的。非常感谢!
    猜你喜欢
    • 1970-01-01
    • 2017-01-28
    • 1970-01-01
    • 2021-11-24
    • 2015-11-22
    • 2018-12-01
    • 1970-01-01
    • 2022-10-25
    • 2022-08-13
    相关资源
    最近更新 更多