dimanche 5 mars 2017

Where is the equivalent hook of `didInsertElement` for template?

I am creating a "landing page" and there are some page logic (mainly animation and interaction) script need to be executed when the page is loaded.

I have tried to put script tag inside the template hbs directly but broccoli complains the syntax issues.

So I thought about the didInsertElement hook inside the component, however, there is no such hook for template.

Where can I put the JavaScript code for template without converting the existing part into component?




Aucun commentaire:

Enregistrer un commentaire