Ember.js(Emberscript)呈现原因“找不到”myModal“模板或视图”错误

Ember.js(Emberscript)呈现原因“找不到”myModal“模板或视图”错误,ember.js,handlebars.js,Ember.js,Handlebars.js,正如标题所说 这是我的路线代码: 我的主模板/template.hbs,其中我调用了模式: <main class="platform"> <div style="padding: 20px; text-align: center" class="row"> <div class="col-md-2"> <button {{action 'openModal' 'myModal'}} class="btn bt

正如标题所说

这是我的路线代码:

我的主模板/template.hbs,其中我调用了模式:

<main class="platform">
  <div style="padding: 20px; text-align: center" class="row">      
      <div class="col-md-2">
        <button {{action 'openModal' 'myModal'}} class="btn btn-primary">Button</button>
      </div>
  </div>
</main>
{{outlet modal}}
我的文件夹结构:

- app
    - projects
        - route.js

        - myModal.hbs
        - template.hbs
它们导致未捕获错误:断言失败:找不到myModal模板或视图。单击模板中的按钮时出错

我的问题是,我应该把myModal模板文件放在哪里


提前谢谢

我也有类似的问题。我的问题是将模态作为组件而不是模板生成。将hbs移出components文件夹解决了该问题。
此外,对于余烬约定,请使用连字符my modal而不是驼峰大小写myModal

你有自动加载的模板吗?尝试使用modal.hbs inside创建目录我的内部模板。
<div><h1>A Modal</h1></div>
- app
    - projects
        - route.js

        - myModal.hbs
        - template.hbs