handlebars.js - Ember.js (Emberscript) render cause "Could not find "myModal" template or view" error -
like title said,
here route code:
class route extends em.route actions: openmodal: (modalname)-> homecoming @render modalname, into: 'template', outlet: 'modal' `export default route` my main template/template.hbs (where phone call modal):
<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}} my mymodal.hbs file content (in case needed):
<div><h1>a modal</h1></div> my folder structure:
- app - projects - route.js - mymodal.hbs - template.hbs they causing uncaught error: assertion failed: not find "mymodal" template or view. error when click button template.
my question is, should set mymodal template file?
thanks in advance
i had similar issue. problem generating modal component instead of template. moving hbs out of components folder resolved issue. ember conventions utilize hyphen (my-modal) instead of camel case (mymodal).
ember.js handlebars.js
No comments:
Post a Comment