build: activate render3 tests in CI (#21279)

PR Close #21279
This commit is contained in:
Marc Laval
2018-01-03 10:45:09 +01:00
committed by Kara Erickson
parent fecf768f43
commit d2cfc6a719
5 changed files with 24 additions and 12 deletions

View File

@ -264,6 +264,14 @@ export function createLNode(
//// Render
//////////////////////////
/**
* Resets the application state.
*/
function resetApplicationState() {
isParent = false;
previousOrParentNode = null !;
}
/**
*
* @param host Existing node to render into.
@ -274,6 +282,7 @@ export function renderTemplate<T>(
hostNode: RElement, template: ComponentTemplate<T>, context: T,
providedRendererFactory: RendererFactory3, host: LElement | null): LElement {
if (host == null) {
resetApplicationState();
rendererFactory = providedRendererFactory;
host = createLNode(
null, LNodeFlags.Element, hostNode,
@ -499,6 +508,7 @@ export function locateHostElement(
* @param rNode Render host element.
*/
export function hostElement(rNode: RElement | null, def: ComponentDef<any>) {
resetApplicationState();
createLNode(
0, LNodeFlags.Element, rNode, createViewState(-1, renderer, getTemplateStatic(def.template)));
}