Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ember.js 在预编译的hbs模板中未定义成员_Ember.js_Gruntjs_Handlebars.js_Precompiled Templates - Fatal编程技术网

Ember.js 在预编译的hbs模板中未定义成员

Ember.js 在预编译的hbs模板中未定义成员,ember.js,gruntjs,handlebars.js,precompiled-templates,Ember.js,Gruntjs,Handlebars.js,Precompiled Templates,我使用的是车把模板的预编译。脚本的顺序如下: <script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.runtime.min.js"></script> <script src="/js/ember.min.js"></script> <script src="/js/app.js"></script> <script s

我使用的是车把模板的预编译。脚本的顺序如下:

<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.runtime.min.js"></script>
<script src="/js/ember.min.js"></script>
<script src="/js/app.js"></script>
<script src="/build/templates.js"></script>
<script src="/js/router.js"></script>
.....

现在我得到这个
Uncaught ReferenceError:define未定义
错误它指的是
define([“ember”],function(ember){
。我做错了什么?

在配置中将
amd
设置为false:

emberTemplates: {
  compile: {
    options: {
      amd: false,
      templateBasePath: /path\/to\//
    },
    files: {
      "path/to/result.js": "path/to/source.handlebars",
      "path/to/another.js": ["path/to/sources/*.handlebars", "path/to/more/*.handlebars"]
    }
  }
}

emberTemplates: {
  compile: {
    options: {
      amd: false,
      templateBasePath: /path\/to\//
    },
    files: {
      "path/to/result.js": "path/to/source.handlebars",
      "path/to/another.js": ["path/to/sources/*.handlebars", "path/to/more/*.handlebars"]
    }
  }
}