From 30d1f292c930d0ba8c198757b3333d4b594692d8 Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Thu, 2 May 2019 09:06:50 -0700 Subject: [PATCH] fix(core): fix interpolate identifier in AOT (#30243) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes a regression introduced in PR 29692 where the interpolate symbol in View Engine was improperly prefixed with the ɵɵ that signifies private instructions for Ivy. It resulted in interpolations of 10+ values not working correctly in AOT mode. This commit removes the prefix. PR Close #30243 --- packages/compiler/src/identifiers.ts | 2 +- .../core/test/acceptance/properties_spec.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/compiler/src/identifiers.ts b/packages/compiler/src/identifiers.ts index ab4c3f2a32..dd2b88f603 100644 --- a/packages/compiler/src/identifiers.ts +++ b/packages/compiler/src/identifiers.ts @@ -92,7 +92,7 @@ export class Identifiers { name: 'ɵinlineInterpolate', moduleName: CORE, }; - static interpolate: o.ExternalReference = {name: 'ɵɵinterpolate', moduleName: CORE}; + static interpolate: o.ExternalReference = {name: 'ɵinterpolate', moduleName: CORE}; static EMPTY_ARRAY: o.ExternalReference = {name: 'ɵEMPTY_ARRAY', moduleName: CORE}; static EMPTY_MAP: o.ExternalReference = {name: 'ɵEMPTY_MAP', moduleName: CORE}; static Renderer: o.ExternalReference = {name: 'Renderer', moduleName: CORE}; diff --git a/packages/core/test/acceptance/properties_spec.ts b/packages/core/test/acceptance/properties_spec.ts index 3f1cb66f17..d7fa008672 100644 --- a/packages/core/test/acceptance/properties_spec.ts +++ b/packages/core/test/acceptance/properties_spec.ts @@ -212,4 +212,22 @@ describe('property instructions', () => { expect(img.src.indexOf('unsafe:')).toBe(0); }); + + it('should handle interpolations with 10+ values', () => { + @Component({ + selector: 'app-comp', + template: ` + link2` + }) + class AppComp { + } + + TestBed.configureTestingModule({declarations: [AppComp]}); + const fixture = TestBed.createComponent(AppComp); + fixture.detectChanges(); + const anchor = fixture.debugElement.query(By.css('a')).nativeElement; + expect(anchor.getAttribute('href')) + .toEqual( + `http://g.com/?one=1&two=2&three=3&four=4&five=5&six=6&seven=7&eight=8&nine=9&ten=10`); + }); });