fix(upgrade): pass correct values to ngOnChanges
for interpolation bindings (#14301)
Previously, the `previousValue` and `currentValue` arguments passed to the `SimpleChange` constructor were swapped for interpolation bindings. This commit also refactors the code, so that interpolation bindings and property bindings share the same implementation, and fixes some broken tests (that hide failures by allowing the `$exceptionHandler` to swallow thrown exceptions). PR Close #14301
This commit is contained in:

committed by
Miško Hevery

parent
701074cf89
commit
1e3dd3dd9b
@ -24,7 +24,12 @@ export function bootstrap(
|
||||
});
|
||||
}
|
||||
|
||||
export function digest(adapter: UpgradeModule) {
|
||||
export function $apply(adapter: UpgradeModule, exp: angular.Ng1Expression) {
|
||||
const $rootScope = adapter.$injector.get($ROOT_SCOPE) as angular.IRootScopeService;
|
||||
$rootScope.$apply(exp);
|
||||
}
|
||||
|
||||
export function $digest(adapter: UpgradeModule) {
|
||||
const $rootScope = adapter.$injector.get($ROOT_SCOPE) as angular.IRootScopeService;
|
||||
$rootScope.$digest();
|
||||
}
|
||||
|
Reference in New Issue
Block a user