fix(livesync): attach __onLiveSyncCore to global object (#4215)

That method needs to be exposed because it's used in NativeScript Angular (https://github.com/NativeScript/nativescript-angular/blob/master/nativescript-angular/platform-common.ts#L91).
This commit is contained in:
Stanimira Vlaeva
2017-05-18 17:13:24 +03:00
committed by GitHub
parent a96a957374
commit 90a0da2863

View File

@ -24,7 +24,7 @@ function onLivesync(args: EventData): void {
}
try {
reloadPage();
g.__onLiveSyncCore();
} catch (ex) {
// Show the error as modal page, save reference to the page in global context.
g.errorPage = parse(`<Page><ScrollView><Label text="${ex}" textWrap="true" style="color: red;" /></ScrollView></Page>`);
@ -74,6 +74,9 @@ export function reloadPage(): void {
}
}
// attach on global, so it can be overwritten in NativeScript Angular
(<any>global).__onLiveSyncCore = reloadPage;
export function resolvePageFromEntry(entry: NavigationEntry): Page {
let page: Page;