lundi 4 novembre 2019

Problem with rendering a custom component

I try to create a custom component for my application with emberJS, I have followed the quickstart tutoriel and now I try to create a upload button as a component.

It seems I don't have code issues but my component don't render on my main page. I have use the ember component generator to create it

here my upload-button.hbs :

<button type="button"></button>

now my upload-button.js :

import Component from '@ember/component';

export default Component.extend({
    actions: {
        showExplorer(){
            alert()
        }
    }
});

for the moment I simply put a alert() method in showExplorer()

and now my main page, application.hbs :

<upload-button @buttonText="Uploader un fichier" />


I expect to see my button but I just have a blank page with no code error.

I suspect that's a really stupid mistake but I can't find it.




Aucun commentaire:

Enregistrer un commentaire