refactor(ivy): generate new ɵɵattribute instruction in host bindings (#30503)

PR Close #30503
This commit is contained in:
Ben Lesh
2019-05-15 20:21:24 -07:00
committed by Jason Aden
parent 1537aec1f9
commit 988afad2af
4 changed files with 37 additions and 37 deletions

View File

@ -667,9 +667,9 @@ function createHostBindingsFunction(
sanitizerFn = resolveSanitizationFn(securityContexts[0], isAttribute);
}
}
const isPropertyInstruction = instruction === R3.property;
const instructionParams: o.Expression[] = isPropertyInstruction ?
const isInstructionWithoutElementIndex =
instruction === R3.property || instruction === R3.attribute;
const instructionParams: o.Expression[] = isInstructionWithoutElementIndex ?
[
o.literal(bindingName),
bindingExpr.currValExpr,
@ -776,7 +776,7 @@ function getBindingNameAndInstruction(binding: ParsedProperty):
const attrMatches = bindingName.match(ATTR_REGEX);
if (attrMatches) {
bindingName = attrMatches[1];
instruction = R3.elementAttribute;
instruction = R3.attribute;
} else {
if (binding.isAnimation) {
bindingName = prepareSyntheticPropertyName(bindingName);