Skip to content

[transpiler] Wrong handling of string templates #509

@yjbanov

Description

@yjbanov

In Dart string interpolation works regardless of quote style. In ES6 string templates perform interpolation and old-style strings do not. The transpiler is unaware of that and therefore produces wrong result.

This:

var a = 1;
var s1 = '${a}';
var s2 = `${a}`;

Transpiles to this:

var a = 1;
var s1 = '${a}';
var s2 = '''${a}''';

Which is wrong. I believe this currently results in a bug with $event in DOM event binding.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions