jeudi 6 août 2015

How to call didInsertElement when a template is rendered since View is deprecated in Ember 1.13

I'm updating to Ember 1.13 and I want to fade in a background on the application template I use to call didInsertElement from the View.

App.ApplicationView = Ember.View.extend({
    didInsertElement: function() {
        $('#login-bg').fadeIn(600);
    }
});

This throws a deprecated because Views are going away. Does Ember create a component for the template? This does not work:

App.ApplicationComponent = Ember.Component.extend({
    didInsertElement: function() {
        $('#login-bg').fadeIn(600);
    }
});




Aucun commentaire:

Enregistrer un commentaire