angular-docs-cn/packages/core/schematics
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
..
migrations refactor(core): static-query schematic should handle function callbacks (#29663) 2019-04-08 17:21:24 -07:00
test refactor(core): static-query schematic should handle function callbacks (#29663) 2019-04-08 17:21:24 -07:00
utils feat(core): template-var-assignment update schematic (#29608) 2019-04-02 15:47:32 -07:00
BUILD.bazel fix(core): add missing migration to npm package (#29705) 2019-04-04 10:51:19 -07:00
migrations.json feat(core): template-var-assignment update schematic (#29608) 2019-04-02 15:47:32 -07:00
tsconfig.json feat(core): template-var-assignment update schematic (#29608) 2019-04-02 15:47:32 -07:00