Ember transition & rendering complete event

后端 未结 4 1351
执念已碎
执念已碎 2020-11-29 08:32

Is there any event fired stating the transition/rendering has completed (and the dom is visible/ready).

setupcontroller/activate are before the dom is built/rendered

4条回答
  •  执念已碎
    2020-11-29 08:57

    didTransition does exist as you hoped -- but its an action and not a hook

    XXRouter
    actions: {
        didTransition: function() {
            this.controller.set("hasTransitioned", true); // or whatever is needed?!
            return true; // Bubble the didTransition event
        },
    }
    
    
    XXController    
    observeTransition: function() {
        alert('complete Transition');
    }.observes('hasTransitioned'),
    

提交回复
热议问题