Skip to content

Commit 3fe3a84

Browse files
committedMay 2, 2019
fix(core): fix interpolate identifier in AOT (#30243)
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
·
8.0.38.0.0-rc.3
1 parent 28e4187 commit 3fe3a84

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed
 

‎packages/compiler/src/identifiers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class Identifiers {
9292
name: 'ɵinlineInterpolate',
9393
moduleName: CORE,
9494
};
95-
static interpolate: o.ExternalReference = {name: 'ɵɵinterpolate', moduleName: CORE};
95+
static interpolate: o.ExternalReference = {name: 'ɵinterpolate', moduleName: CORE};
9696
static EMPTY_ARRAY: o.ExternalReference = {name: 'ɵEMPTY_ARRAY', moduleName: CORE};
9797
static EMPTY_MAP: o.ExternalReference = {name: 'ɵEMPTY_MAP', moduleName: CORE};
9898
static Renderer: o.ExternalReference = {name: 'Renderer', moduleName: CORE};

‎packages/core/test/acceptance/properties_spec.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,22 @@ describe('property instructions', () => {
212212

213213
expect(img.src.indexOf('unsafe:')).toBe(0);
214214
});
215+
216+
it('should handle interpolations with 10+ values', () => {
217+
@Component({
218+
selector: 'app-comp',
219+
template: `
220+
<a href="http://g.com/?one={{'1'}}&two={{'2'}}&three={{'3'}}&four={{'4'}}&five={{'5'}}&six={{'6'}}&seven={{'7'}}&eight={{'8'}}&nine={{'9'}}&ten={{'10'}}">link2</a>`
221+
})
222+
class AppComp {
223+
}
224+
225+
TestBed.configureTestingModule({declarations: [AppComp]});
226+
const fixture = TestBed.createComponent(AppComp);
227+
fixture.detectChanges();
228+
const anchor = fixture.debugElement.query(By.css('a')).nativeElement;
229+
expect(anchor.getAttribute('href'))
230+
.toEqual(
231+
`http://g.com/?one=1&two=2&three=3&four=4&five=5&six=6&seven=7&eight=8&nine=9&ten=10`);
232+
});
215233
});

0 commit comments

Comments
 (0)
Please sign in to comment.