fix(ivy): compiler should emit new refresh pattern (#21862)

Change compiler to reflect changes made in #21650

PR Close #21862
This commit is contained in:
Chuck Jazdzewski
2018-01-29 09:11:04 -08:00
committed by Jason Aden
parent 9dca5f2743
commit 06d6c76192
3 changed files with 11 additions and 15 deletions

View File

@ -21,7 +21,6 @@ export class Identifiers {
/* Methods */
static NEW_METHOD = 'n';
static HOST_BINDING_METHOD = 'h';
static REFRESH_METHOD = 'r';
/* Instructions */
static createElement: o.ExternalReference = {name: 'ɵE', moduleName: CORE};

View File

@ -464,11 +464,10 @@ class TemplateDefinitionBuilder implements TemplateAstVisitor, LocalResolver {
o.importExpr(R3.bind).callFn([convertedBinding.currValExpr]));
}
// e.g. TodoComponentDef.r(0, 0);
this._refreshMode.push(
this.definitionOf(directiveType, kind)
.callMethod(R3.REFRESH_METHOD, [o.literal(directiveIndex), o.literal(nodeIndex)])
.toStmt());
// e.g. r(0, 0);
this.instruction(
this._refreshMode, directive.sourceSpan, R3.refreshComponent, o.literal(directiveIndex),
o.literal(nodeIndex));
}
}