angular-docs-cn/packages/core/schematics/migrations
Paul Gschwendtner 1102b02406 refactor(core): static-query schematic should handle function callbacks (#29663)
Currently the static-query schematic is not able to properly handle
call expressions that pass function declarations that access a given
query. e.g.

```ts
ngOnInit() {
  this._callFunction(() => this.myQuery.doSomething());
}

_callFunction(cb: any) { cb(); }
```

In that case the passed function is executed synchronously in
the "ngOnInit" lifecycle and therefore the query needs to be
detected as "static".

We can fix this by keeping track of the current function context
and using it to resolve identifiers to the passed arguments.

PR Close #29663
2019-04-08 17:21:24 -07:00
..
static-queries refactor(core): static-query schematic should handle function callbacks (#29663) 2019-04-08 17:21:24 -07:00
template-var-assignment refactor(core): polish failure messages for template-var-assignment schematic (#29708) 2019-04-08 09:46:57 -07:00