angular-cn/packages/core/schematics/migrations/static-queries/angular
Paul Gschwendtner 5b32f55a3a refactor(core): static-query schematic should check templates (#29713)
Queries can technically be also accessed within component templates
e.g.

```html
<my-comp [binding]="myQuery"></my-comp>
```

In that case the query with the property "myQuery" is accessed
statically and needs to be marked with `static: true`. There are
other edge cases that need to be handled as the template property
read doesn't necessarily resolve to the actual query property.

For example:

```html
<foo #myQuery></foo>
<my-comp [binding]="myQuery"></my-comp>
```

In this scenario the binding doesn't refer to the actual query
because the template reference variable takes precedence. The
query doesn't need to be marked with "static: true" this time.

This commit ensures that the `static-query` migration schematic
now handles this cases properly. Also template property reads
that access queries from within a `<ng-template>` are ignored
as these can't access the query before the view has been initialized.

Resolves FW-1216

PR Close #29713
2019-04-11 08:22:44 -07:00
..
analyze_query_usage.ts refactor(core): static-query schematic should check templates (#29713) 2019-04-11 08:22:44 -07:00
declaration_usage_visitor.ts refactor(core): static-query schematic should handle abstract classes (#29688) 2019-04-10 12:15:05 -07:00
directive_inputs.ts refactor(core): stronger type for resolved angular decorators (#29608) 2019-04-02 15:47:32 -07:00
ng_query_visitor.ts refactor(core): static-query schematic should check templates (#29713) 2019-04-11 08:22:44 -07:00
query-definition.ts refactor(core): move schematic typescript logic to utility package (#29608) 2019-04-02 15:47:32 -07:00
query_read_html_visitor.ts refactor(core): static-query schematic should check templates (#29713) 2019-04-11 08:22:44 -07:00
super_class.ts refactor(core): static-query schematic should handle abstract classes (#29688) 2019-04-10 12:15:05 -07:00