Is there an after view change hook (much like didInsertElement)?

后端 未结 5 731
旧巷少年郎
旧巷少年郎 2021-02-06 08:07

Using the didInsertElement hook, I\'m able to do some jQuery plugin initialization that is needed. However, if a property changes, Ember re-renders the view, but do

5条回答
  •  Happy的楠姐
    2021-02-06 08:17

    I fixed the same issue like this:

    Ember.run.sync(); //force applying bindings
    //run after 100ms your code
    Ember.run.later(function () {
      //your code
    }, 100);
    

    EDIT: Since this is an old answer, it might be obsolete in the current EmberJS release

提交回复
热议问题