fix(compiler-cli): generate let
statements in ES2015+ mode (#38775)
When the target of the compiler is ES2015 or newer then we should be generating `let` and `const` variable declarations rather than `var`. PR Close #38775
This commit is contained in:

committed by
Misko Hevery

parent
6158dc16b4
commit
123bff7cb6
@ -209,7 +209,7 @@ describe('compiler compliance: bindings', () => {
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
…
|
||||
if (rf & 2) {
|
||||
var $tmp0$ = null;
|
||||
let $tmp0$ = null;
|
||||
$r3$.ɵɵproperty("title", ctx.myTitle)("id", ($tmp0$ = $r3$.ɵɵpipeBind1(1, 3, ($tmp0$ = ctx.auth()) == null ? null : $tmp0$.identity())) == null ? null : $tmp0$.id)("tabindex", 1);
|
||||
}
|
||||
}
|
||||
@ -750,7 +750,7 @@ describe('compiler compliance: bindings', () => {
|
||||
hostVars: 1,
|
||||
hostBindings: function HostBindingDir_HostBindings(rf, ctx) {
|
||||
if (rf & 2) {
|
||||
var $tmp0$ = null;
|
||||
let $tmp0$ = null;
|
||||
$r3$.ɵɵhostProperty("id", ($tmp0$ = ctx.getData()) == null ? null : $tmp0$.id);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user