angular-cn/packages/upgrade/test/static/integration
Georgios Kalpakas b3e63c09ab fix(upgrade): initialize all inputs in time for `ngOnChanges()`
Previously, non-bracketed inputs (e.g. `xyz="foo"`) on downgraded components
were initialized using `attrs.$observe()` (which uses `$evalAsync()` under the
hood), while bracketed inputs (e.g. `[xyz]="'foo'"`) were initialized using
`$watch()`. If the downgraded component was created during a `$digest` (e.g. by
an `ng-if` watcher), the non-bracketed inputs were not initialized in time for
the initial call to `ngOnChanges()` and `ngOnInit()`.

This commit fixes it by using `$watch()` to initialize all inputs. `$observe()`
is still used for subsequent updates on non-bracketed inputs, because it is more
performant.

Fixes #16212
2017-05-03 19:32:57 -07:00
..
change_detection_spec.ts feat(upgrade): use `ComponentFactory.inputs/outputs/ngContentSelectors` (#15214) 2017-03-17 13:52:50 -05:00
content_projection_spec.ts feat(upgrade): use `ComponentFactory.inputs/outputs/ngContentSelectors` (#15214) 2017-03-17 13:52:50 -05:00
downgrade_component_spec.ts fix(upgrade): initialize all inputs in time for `ngOnChanges()` 2017-05-03 19:32:57 -07:00
examples_spec.ts feat(upgrade): use `ComponentFactory.inputs/outputs/ngContentSelectors` (#15214) 2017-03-17 13:52:50 -05:00
injection_spec.ts feat(upgrade): allow setting the angularjs lib at runtime (#15168) 2017-04-17 14:35:55 -07:00
testability_spec.ts fix(upgrade): Update types for TypeScript nullability support 2017-04-18 12:07:33 -07:00
upgrade_component_spec.ts fix(upgrade): Update types for TypeScript nullability support 2017-04-18 12:07:33 -07:00