fix(upgrade): call setInterval outside the Angular zone
This wraps the $interval service when using upgrade to run the $interval() call outside the Angular zone. However, the callback is invoked within the Angular zone, so changes still propagate to downgraded components.
This commit is contained in:

committed by
Alex Rickabaugh

parent
bb2fc6b8da
commit
269bbe0e7d
@ -158,6 +158,12 @@ export interface IInjectorService {
|
||||
has(key: string): boolean;
|
||||
}
|
||||
|
||||
export interface IIntervalService {
|
||||
(func: Function, delay: number, count?: number, invokeApply?: boolean,
|
||||
...args: any[]): Promise<any>;
|
||||
cancel(promise: Promise<any>): boolean;
|
||||
}
|
||||
|
||||
export interface ITestabilityService {
|
||||
findBindings(element: Element, expression: string, opt_exactMatch?: boolean): Element[];
|
||||
findModels(element: Element, expression: string, opt_exactMatch?: boolean): Element[];
|
||||
|
@ -11,6 +11,7 @@ export const $CONTROLLER = '$controller';
|
||||
export const $DELEGATE = '$delegate';
|
||||
export const $HTTP_BACKEND = '$httpBackend';
|
||||
export const $INJECTOR = '$injector';
|
||||
export const $INTERVAL = '$interval';
|
||||
export const $PARSE = '$parse';
|
||||
export const $PROVIDE = '$provide';
|
||||
export const $ROOT_SCOPE = '$rootScope';
|
||||
|
Reference in New Issue
Block a user