angular-cn/packages/compiler-cli
Alex Rickabaugh b61784948a fix(ivy): template inputs/outputs should not be bound in template scope (#30669)
The R3TargetBinder "binds" an Angular template AST, computing semantic
information regarding the template and making it accessible.

One of the binding passes previously had a bug, where for the following
template:

<div *ngIf="foo as foo"></div>

which desugars to:

<ng-template ngIf [ngIf]="foo" let-foo="ngIf">
  <div></div>
</ng-template>

would have the `[ngIf]` binding processed twice - in both the scope which
contains the `<ng-template>` and the scope inside the template. The bug
arises because during the latter, `foo` is a variable defined by `let-foo`,
and so the R3TargetBinder would incorrectly learn that `foo` inside `[ngIf]`
maps to that variable.

This commit fixes the bug by only processing inputs, outputs, and
templateAttrs from `Template`s in the outer scope.

PR Close #30669
2019-05-30 15:17:07 -04:00
..
integrationtest fix(core): require 'static' flag on queries in typings (#30639) 2019-05-24 16:55:00 -04:00
ngcc feat(ivy): add ɵɵtextInterpolateX instructions (#30011) 2019-05-29 12:38:58 -04:00
src fix(ivy): generate explicit type annotation for NgModuleFactory calls in ngfactories (#30708) 2019-05-30 15:09:56 -04:00
test fix(ivy): template inputs/outputs should not be bound in template scope (#30669) 2019-05-30 15:17:07 -04:00
BUILD.bazel build: update rules_nodejs and clean up bazel warnings (#30370) 2019-05-14 10:08:45 -07:00
index.ts feat(compiler-cli): export tooling definitions (#29929) 2019-04-17 17:23:01 -07:00
ngtools2.ts refactor(compiler-cli): expose ngtools api separately (#18978) 2017-08-31 14:37:13 -07:00
package.json build: upgrade yargs package to 13.1.0 (#29722) 2019-04-26 16:29:29 -07:00
tsconfig-build.json build(compiler-cli): enable full TypeScript strictness (#29436) 2019-03-21 12:14:39 -04:00
tsconfig.json build(compiler-cli): enable full TypeScript strictness (#29436) 2019-03-21 12:14:39 -04:00