dimanche 5 février 2017

How to use didInsertElement properly in ember.js component?

I want to inject thirdparty JS and do some stuff after the component is inserted into the DOM. So the didInsertElement hook will be fine for me.

There are following two different types in using the didInsertElement.

initialLoad: on('didInsertElement', function() {});

And

didInsertElement() {}

What is the difference between them? Which one I've to use for my use case? Please guide.

Thanks in advance :)




Aucun commentaire:

Enregistrer un commentaire