Execute code once after all views have completely rendered in Ember.js

后端 未结 3 630
慢半拍i
慢半拍i 2021-01-05 02:15

Something like document ready, but after all Ember views rendering

I am doing this right now with an override on ApplicationView didInsertElement, which seems to be

3条回答
  •  逝去的感伤
    2021-01-05 02:25

    App.ApplicationView = Ember.View.extend({
      afterRender: function () {
        Ember.run.next(this, function () {
          // This will run one time, after the full initial render.
        });
      }
    });
    

提交回复
热议问题