Ember - ConnectOutlet - when does view change from preRender to inDom

Posted by dagda1 on Stack Overflow See other posts from Stack Overflow or by dagda1
Published on 2012-11-21T21:08:37Z Indexed on 2012/11/23 5:00 UTC
Read the original article Hit count: 118

Filed under:

I am trying to get my head round the connectOutlet method and when a view that is returned from connectOutet is actually inserted into the DOM.

The view that is created in connectOutlet leaves connectOutlet in the preRender state.

connectOutlet: function(name, context) {
  // method body
    view = this.createOutletView(outletName, viewClass);

    if (controller) { set(view, 'controller', controller); }
    set(this, outletName, view);

    return view;
}

I've not tracked down where or when the view is inserted into the Dom and the view transitions to the inDom state.

I suspect the runloop is at play and it transitions after the current runloop has finished.

Can anyone shed any light on this?

© Stack Overflow or respective owner

Related posts about ember.js