docs/vendor.js
function enterView(newView, host) {
    var oldView = viewData;
    directives = newView && newView[DIRECTIVES];
    tView = newView && newView[TVIEW];
    creationMode = newView && (newView[FLAGS] & 1 /* CreationMode */) === 1 /* CreationMode */;
    firstTemplatePass = newView && tView.firstTemplatePass;
    renderer = newView && newView[RENDERER];
    if (host != null) {
        previousOrParentNode = host;
        isParent = true;
    }
    viewData = newView;
    currentQueries = newView && newView[QUERIES];
    return oldView;
}
function enterView(newView, host) {
    var oldView = viewData;
    directives = newView && newView[DIRECTIVES];
    tView = newView && newView[TVIEW];
    creationMode = newView && (newView[FLAGS] & 1 /* CreationMode */) === 1 /* CreationMode */;
    firstTemplatePass = newView && tView.firstTemplatePass;
    renderer = newView && newView[RENDERER];
    if (host != null) {
        previousOrParentNode = host;
        isParent = true;
    }
    viewData = newView;
    currentQueries = newView && newView[QUERIES];
    return oldView;
}
function enterView ( newView , host ) { var oldView = viewData ; directives = newView && newView [ DIRECTIVES ] ; tView = newView && newView [ TVIEW ] ; creationMode = newView && ( newView [ FLAGS ] & 1 /* CreationMode */ ) === 1 /* CreationMode */ ; firstTemplatePass = newView && tView . firstTemplatePass ; renderer = newView && newView [ RENDERER ] ; if ( host != null ) { previousOrParentNode = host ; isParent = true ; } viewData = newView ; currentQueries = newView && newView [ QUERIES ] ; return oldView ; }
Swap the current state with a new state.

For performance reasons we store the state in the top level of the module.
This way we minimize the number of properties to read. Whenever a new view
is entered we have to store the state for later, and when the view is
exited the state has to be restored

@param newView New state to become active
@param host Element to which the View is a child of
@returns the previous state;
Swap the current state with a new state .