mardi 21 juin 2016

Ember js how can i run a function after model change?

I am using materialize css library and it says

Collapsible elements only need initialization if they are added dynamically

And i add some elements dynamically. So after the view is rendered i should run this function:

$('.collapsible').collapsible({
  accordion : false 
});

In setupController function i make some requests and after every request finished i setup the controller. When controller gets the model and after the view is rendered with the new model data i should run a function to initialize the ui elments




Aucun commentaire:

Enregistrer un commentaire