From 7b06ce7f70e2d47a153383fb9b246f6891b672a6 Mon Sep 17 00:00:00 2001 From: VladimirAmiorkov Date: Mon, 12 Aug 2019 13:03:27 +0300 Subject: [PATCH 1/2] fix(hmr): close modal views during livesync #7669 --- nativescript-angular/platform-common.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nativescript-angular/platform-common.ts b/nativescript-angular/platform-common.ts index d6a4c557f..cd9d02dd4 100644 --- a/nativescript-angular/platform-common.ts +++ b/nativescript-angular/platform-common.ts @@ -6,6 +6,7 @@ import "./zone-js/dist/zone-nativescript"; import "./polyfills/array"; import "./polyfills/console"; import { profile, uptime } from "tns-core-modules/profiling"; +import { getRootView } from "tns-core-modules/application"; import "./dom-adapter"; import { @@ -153,6 +154,11 @@ export class NativeScriptPlatformRef extends PlatformRef { private bootstrapApp() { (global).__onLiveSyncCore = () => { if (this.appOptions.hmrOptions) { + const rootView = getRootView(); + if (rootView) { + rootView._closeAllModalViewsInternal(); + } + this.appOptions.hmrOptions.livesyncCallback(() => this._livesync()); } else { this._livesync(); From 563828dc16fb9ff7184c2ffdf758afc9c10ffda5 Mon Sep 17 00:00:00 2001 From: VladimirAmiorkov Date: Mon, 26 Aug 2019 13:51:36 +0300 Subject: [PATCH 2/2] chore: change 'tests-app-ng' app to symlink source --- e2e/tests-app-ng/package.json | 17 ++++++++++++----- e2e/tests-app-ng/tsconfig.json | 10 +++++++++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/e2e/tests-app-ng/package.json b/e2e/tests-app-ng/package.json index a4935f365..14546adfb 100644 --- a/e2e/tests-app-ng/package.json +++ b/e2e/tests-app-ng/package.json @@ -4,9 +4,16 @@ "readme": "NativeScript Application", "repository": "", "nativescript": { - "id": "org.nativescript.testsappng" + "id": "org.nativescript.testsappng", + "tns-ios": { + "version": "6.0.2" + }, + "tns-android": { + "version": "6.0.2" + } }, "dependencies": { + "@angular/animations": "~8.2.0", "@angular/common": "~8.2.0", "@angular/compiler": "~8.2.0", "@angular/core": "~8.2.0", @@ -14,7 +21,7 @@ "@angular/platform-browser": "~8.2.0", "@angular/platform-browser-dynamic": "~8.2.0", "@angular/router": "~8.2.0", - "nativescript-angular": "next", + "nativescript-angular": "file:../../nativescript-angular", "nativescript-intl": "~3.0.0", "nativescript-theme-core": "^1.0.4", "reflect-metadata": "~0.1.8", @@ -23,6 +30,8 @@ "zone.js": "^0.9.1" }, "devDependencies": { + "@angular/compiler-cli": "~8.2.0", + "@ngtools/webpack": "~8.2.0", "babel-traverse": "6.24.1", "babel-types": "6.24.1", "babylon": "6.17.0", @@ -31,9 +40,7 @@ "lazy": "1.0.11", "nativescript-dev-webpack": "next", "tslint": "^5.4.3", - "typescript": "~3.5.3", - "@angular/compiler-cli": "~8.0.0", - "@ngtools/webpack": "~8.0.0" + "typescript": "~3.5.3" }, "scripts": { "tslint": "tslint --config tslint.json 'app/**/*.ts'" diff --git a/e2e/tests-app-ng/tsconfig.json b/e2e/tests-app-ng/tsconfig.json index f251eb444..d93d819b4 100644 --- a/e2e/tests-app-ng/tsconfig.json +++ b/e2e/tests-app-ng/tsconfig.json @@ -22,8 +22,16 @@ ] } }, + "include": [ + "../../nativescript-angular", + "**/*" + ], "exclude": [ + "../../nativescript-angular/node_modules", + "../../nativescript-angular/**/*.d.ts", "node_modules", - "platforms" + "platforms", + "**/*.aot", + "e2e" ] } \ No newline at end of file