Guidance on how to setup the basic “Components” example from the official EmberJS homepage

后端 未结 1 1776
星月不相逢
星月不相逢 2021-01-26 03:16

My background is in old-school web development and LAMP stack development mixed with Linux server administration. Meaning I can code HTML, PHP, CSS and JavsScript—as well as man

相关标签:
1条回答
  • 2021-01-26 03:54

    The problem you have here is that you have placed the gravatar-image.js file in the templates/components folder and it should be in the components folder. Inside templates folder goes only *.hbs (templates is used for route templates and templates/components is used for component templates).

    There is another way of structuring the folders called POD in which you have a folder with the name of the component and its files inside. With your component would be like this: gravatar-image/component.js gravatar-image/template.hbs

    Check this tutorial if you are interested in using this POD structure.

    0 讨论(0)
提交回复
热议问题