diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51c07e20d..8d8ef7995 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+
+# [9.0.0](https://github.com/NativeScript/nativescript-angular/compare/8.20.4...9.0.0) (2020-06-03)
+
+
+### Features
+
+* angular 9 ivy ([fbe2450](https://github.com/NativeScript/nativescript-angular/commit/fbe2450))
+
+
## [8.20.4](https://github.com/NativeScript/nativescript-angular/compare/8.20.3...8.20.4) (2020-01-07)
@@ -649,7 +658,7 @@ Angular apps described in [this](https://angular.io/guide/ngmodule-faq#q-browser
Migration steps:
In all NgModules, except the root one (`AppModule`), replace:
```
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
+import { NativeScriptModule } from "@nativescript/angular";
…
@NgModule({
imports: [
diff --git a/build/pack-scripts/package.json b/build/pack-scripts/package.json
index 93c081421..3cdfbcd0e 100644
--- a/build/pack-scripts/package.json
+++ b/build/pack-scripts/package.json
@@ -10,9 +10,9 @@
"license": "ISC",
"devDependencies": {
"@types/node": "^12.7.12",
- "fs-extra": "^8.1.0",
+ "fs-extra": "^9.0.0",
"rimraf": "^3.0.0",
- "ts-node": "^8.4.1",
- "typescript": "^3.6.4"
+ "ts-node": "^8.10.2",
+ "typescript": "^3.8.3"
}
}
diff --git a/build/pack-scripts/tsconfig.json b/build/pack-scripts/tsconfig.json
index a250c1c15..deb92c7ef 100644
--- a/build/pack-scripts/tsconfig.json
+++ b/build/pack-scripts/tsconfig.json
@@ -6,10 +6,11 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"types": [
"node"
diff --git a/e2e/animation-examples/app/app.module.ts b/e2e/animation-examples/app/app.module.ts
index 7e15dde96..6b5a3249f 100644
--- a/e2e/animation-examples/app/app.module.ts
+++ b/e2e/animation-examples/app/app.module.ts
@@ -4,11 +4,21 @@ import {
NgModuleFactoryLoader
} from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
-import { NativeScriptAnimationsModule } from "nativescript-angular/animations";
-import { NSModuleFactoryLoader } from "nativescript-angular/router";
+import { NativeScriptModule } from "@nativescript/angular";
+import { NativeScriptAnimationsModule } from "@nativescript/angular/animations";
+import { NSModuleFactoryLoader } from "@nativescript/angular/router";
+
+import { AppRoutingModule } from "./app.routing";
+import { AnimationsListComponent } from "./animations-list.component";
+import { AnimationBuilderComponent } from "./animation-builder.component";
+import { ExternalAnimationComponent } from "./external-animation.component";
+import { FadeInOutComponent } from "./fade-in-out.component";
+import { OptionsComponent } from "./options.component";
+import { OptionsDefaultComponent } from "./options-default.component";
+import { AnimateChildComponent } from "./animate-child.component";
+import { SelectorAllComponent } from "./selector-all.component";
+import { QueryStaggerComponent } from "./query-stagger.component";
-import { AppRoutingModule, routedComponents } from "./app.routing";
import { AppComponent } from "./app.component";
@NgModule({
@@ -17,7 +27,15 @@ import { AppComponent } from "./app.component";
],
declarations: [
AppComponent,
- ...routedComponents,
+ AnimationsListComponent,
+ AnimationBuilderComponent,
+ ExternalAnimationComponent,
+ FadeInOutComponent,
+ OptionsComponent,
+ OptionsDefaultComponent,
+ AnimateChildComponent,
+ SelectorAllComponent,
+ QueryStaggerComponent,
],
imports: [
NativeScriptModule,
diff --git a/e2e/animation-examples/app/app.routing.ts b/e2e/animation-examples/app/app.routing.ts
index c9eb97157..df70ca363 100644
--- a/e2e/animation-examples/app/app.routing.ts
+++ b/e2e/animation-examples/app/app.routing.ts
@@ -1,6 +1,6 @@
import { NgModule } from "@angular/core";
import { Routes } from "@angular/router";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { AnimationsListComponent } from "./animations-list.component";
import { AnimationBuilderComponent } from "./animation-builder.component";
@@ -23,7 +23,7 @@ const routes: Routes = [
{ path: "animate-child", component: AnimateChildComponent },
{ path: "selector", component: SelectorAllComponent },
{ path: "query-stagger", component: QueryStaggerComponent },
- { path: "hero", loadChildren: "./hero/hero.module#HeroModule" },
+ { path: "hero", loadChildren: () => import("./hero/hero.module").then(m => m.HeroModule) },
];
@NgModule({
@@ -31,15 +31,3 @@ const routes: Routes = [
exports: [NativeScriptRouterModule],
})
export class AppRoutingModule { }
-
-export const routedComponents = [
- AnimationsListComponent,
- AnimationBuilderComponent,
- ExternalAnimationComponent,
- FadeInOutComponent,
- OptionsComponent,
- OptionsDefaultComponent,
- AnimateChildComponent,
- SelectorAllComponent,
- QueryStaggerComponent,
-];
diff --git a/e2e/animation-examples/app/hero/hero-routing.module.ts b/e2e/animation-examples/app/hero/hero-routing.module.ts
index 3e3126068..57426f197 100644
--- a/e2e/animation-examples/app/hero/hero-routing.module.ts
+++ b/e2e/animation-examples/app/hero/hero-routing.module.ts
@@ -1,6 +1,6 @@
import { NgModule } from "@angular/core";
import { Routes } from "@angular/router";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { HeroTeamBuilderComponent } from './hero-team-builder.component';
diff --git a/e2e/animation-examples/app/hero/hero.module.ts b/e2e/animation-examples/app/hero/hero.module.ts
index 6fefbb212..139da6013 100644
--- a/e2e/animation-examples/app/hero/hero.module.ts
+++ b/e2e/animation-examples/app/hero/hero.module.ts
@@ -1,5 +1,5 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptCommonModule } from "nativescript-angular/common";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
import { HeroRoutingModule, routedComponents } from "./hero-routing.module";
diff --git a/e2e/animation-examples/app/main.aot.ts b/e2e/animation-examples/app/main.aot.ts
index 98bf134fc..015f6e008 100644
--- a/e2e/animation-examples/app/main.aot.ts
+++ b/e2e/animation-examples/app/main.aot.ts
@@ -1,4 +1,4 @@
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
import { AppModuleNgFactory } from "./app.module.ngfactory";
platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);
diff --git a/e2e/animation-examples/app/main.ts b/e2e/animation-examples/app/main.ts
index 3636ef86e..8c0e3deb1 100644
--- a/e2e/animation-examples/app/main.ts
+++ b/e2e/animation-examples/app/main.ts
@@ -1,6 +1,6 @@
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
-import { animationsTraceCategory } from "nativescript-angular/trace";
-import { setCategories, enable } from "trace";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
+import { animationsTraceCategory } from "@nativescript/angular/trace";
+import { setCategories, enable } from "@nativescript/core/trace";
import { AppModule } from "./app.module";
diff --git a/e2e/animation-examples/ngcc.config.js b/e2e/animation-examples/ngcc.config.js
new file mode 100644
index 000000000..2d2413164
--- /dev/null
+++ b/e2e/animation-examples/ngcc.config.js
@@ -0,0 +1,19 @@
+module.exports = {
+ packages: {
+ "@nativescript/angular": {
+ entryPoints: {
+ ".": {
+ override: {
+ main: "./index.js",
+ typings: "./index.d.ts",
+ },
+ ignoreMissingDependencies: true,
+ }
+ },
+ ignorableDeepImportMatchers: [
+ /tns-core-modules\//,
+ /@nativescript\/core\//,
+ ]
+ }
+ }
+};
\ No newline at end of file
diff --git a/e2e/animation-examples/package.json b/e2e/animation-examples/package.json
index 126f35fa3..ae4ccb36a 100644
--- a/e2e/animation-examples/package.json
+++ b/e2e/animation-examples/package.json
@@ -6,31 +6,31 @@
"nativescript": {
"id": "org.nativescript.ng4animations",
"tns-ios": {
- "version": "latest"
+ "version": "6.5.1"
},
"tns-android": {
"version": "latest"
}
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular/compiler-cli": "~8.2.0",
- "@ngtools/webpack": "~8.2.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@ngtools/webpack": "~9.1.0",
"@types/chai": "~4.1.7",
"@types/mocha": "~5.2.5",
"@types/node": "~10.12.18",
@@ -44,14 +44,18 @@
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.3"
},
"scripts": {
+ "clean": "npx rimraf hooks node_modules package-lock.json",
+ "setup": "cd ../../nativescript-angular && npm run pack && cd ../e2e/animation-examples && npm run clean",
"u": "update-ns-webpack",
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
"e2e-watch": "tsc -p e2e --watch",
"update-app-ng-deps": "update-app-ng-deps",
"ns-verify-bundle": "ns-verify-bundle",
- "update-ns-webpack": "update-ns-webpack"
+ "update-ns-webpack": "update-ns-webpack",
+ "ngcc": "ngcc --properties es2015 module main --first-only",
+ "postinstall": "npm run ngcc"
}
}
diff --git a/e2e/animation-examples/tsconfig.json b/e2e/animation-examples/tsconfig.json
index eee1eca47..1dbfa0f5b 100644
--- a/e2e/animation-examples/tsconfig.json
+++ b/e2e/animation-examples/tsconfig.json
@@ -6,33 +6,26 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"baseUrl": ".",
"paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
"~/*": [
"app/*"
+ ],
+ "*": [
+ "./node_modules/*"
]
}
},
- "include": [
- "../../nativescript-angular-package",
- "../../nativescript-angular",
- "**/*"
+ "files": [
+ "./app/main.ts"
],
"exclude": [
- "../../nativescript-angular-package/node_modules",
- "../../nativescript-angular-package/**/*.d.ts",
- "../../nativescript-angular/node_modules",
- "../../nativescript-angular/**/*.d.ts",
"node_modules",
"platforms",
"**/*.aot",
diff --git a/e2e/animation-examples/tsconfig.tns.json b/e2e/animation-examples/tsconfig.tns.json
index 95f2ecee0..a96f6bbc6 100644
--- a/e2e/animation-examples/tsconfig.tns.json
+++ b/e2e/animation-examples/tsconfig.tns.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
- "module": "es2015",
+ "module": "ESNext",
"moduleResolution": "node"
}
}
diff --git a/e2e/modal-navigation-ng/app/app.component.ts b/e2e/modal-navigation-ng/app/app.component.ts
index 45decfedf..c5617460f 100644
--- a/e2e/modal-navigation-ng/app/app.component.ts
+++ b/e2e/modal-navigation-ng/app/app.component.ts
@@ -1,11 +1,11 @@
import { Component, ViewContainerRef } from "@angular/core";
import { Router, NavigationEnd } from "@angular/router";
-import { NSLocationStrategy } from "nativescript-angular/router/ns-location-strategy";
+import { NSLocationStrategy } from "@nativescript/angular";
import { ViewContainerRefService } from "./shared/ViewContainerRefService";
import { AppModule } from "./app.module";
-import { ModalDialogOptions, ModalDialogService } from "nativescript-angular";
+import { ModalDialogOptions, ModalDialogService } from "@nativescript/angular";
import { ModalViewComponent } from "./modal-shared/modal-view.component";
@Component({
diff --git a/e2e/modal-navigation-ng/app/app.module.ts b/e2e/modal-navigation-ng/app/app.module.ts
index b868bf401..78e2e08ea 100644
--- a/e2e/modal-navigation-ng/app/app.module.ts
+++ b/e2e/modal-navigation-ng/app/app.module.ts
@@ -1,5 +1,5 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
+import { NativeScriptModule } from "@nativescript/angular";
import { AppRoutingModule } from "./app.routing";
import { AppComponent } from "./app.component";
import { NamedRouterComponent } from "./named-router.component";
@@ -19,9 +19,9 @@ import { ModalViewContentComponent } from "./modal-shared/modal-view-content.com
import { ModalSharedSecondComponent } from "./modal-shared/modal-shared-second.component";
import { ViewContainerRefService } from "./shared/ViewContainerRefService";
-import { enable as traceEnable, addCategories } from "tns-core-modules/trace";
-import { routerTraceCategory } from "nativescript-angular/trace";
-import { NativeScriptPlatformRef } from "nativescript-angular";
+import { enable as traceEnable, addCategories } from "@nativescript/core/trace";
+import { routerTraceCategory } from "@nativescript/angular/trace";
+import { NativeScriptPlatformRef } from "@nativescript/angular";
addCategories(routerTraceCategory);
traceEnable();
diff --git a/e2e/modal-navigation-ng/app/app.routing.ts b/e2e/modal-navigation-ng/app/app.routing.ts
index 263f4a1b1..8cc09094e 100644
--- a/e2e/modal-navigation-ng/app/app.routing.ts
+++ b/e2e/modal-navigation-ng/app/app.routing.ts
@@ -1,5 +1,5 @@
import { NgModule } from "@angular/core";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { Routes, Router } from "@angular/router";
import { HomeComponent } from "./home/home.component";
diff --git a/e2e/modal-navigation-ng/app/home/home.component.ts b/e2e/modal-navigation-ng/app/home/home.component.ts
index c40be5634..a048ad6d1 100644
--- a/e2e/modal-navigation-ng/app/home/home.component.ts
+++ b/e2e/modal-navigation-ng/app/home/home.component.ts
@@ -1,16 +1,16 @@
import { Component, ViewContainerRef } from "@angular/core";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
-import { RouterExtensions } from "nativescript-angular/router";
-import { EventData } from "tns-core-modules/data/observable";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
+import { RouterExtensions } from "@nativescript/angular/router";
+import { EventData } from "@nativescript/core/data/observable";
import { ViewContainerRefService } from "../shared/ViewContainerRefService";
import { ModalRouterComponent } from "../modal/modal-router/modal-router.component";
import { ModalComponent } from "../modal/modal.component";
import { ModalViewComponent } from "../modal-shared/modal-view.component";
-import { confirm } from "tns-core-modules/ui/dialogs";
+import { confirm } from "@nativescript/core/ui/dialogs";
import { AppModule } from "../app.module";
-import { PageService } from "nativescript-angular";
+import { PageService } from "@nativescript/angular";
@Component({
moduleId: module.id,
diff --git a/e2e/modal-navigation-ng/app/layout.component.ts b/e2e/modal-navigation-ng/app/layout.component.ts
index fe6ee9a9d..3fbdb6250 100644
--- a/e2e/modal-navigation-ng/app/layout.component.ts
+++ b/e2e/modal-navigation-ng/app/layout.component.ts
@@ -1,7 +1,7 @@
import { Component, ViewContainerRef } from "@angular/core";
import { Router, NavigationEnd } from "@angular/router";
-import { NSLocationStrategy } from "nativescript-angular/router/ns-location-strategy";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
+import { NSLocationStrategy } from "@nativescript/angular";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
import { ModalViewComponent } from "./modal-shared/modal-view.component";
import { ViewContainerRefService } from "./shared/ViewContainerRefService";
import { AppModule } from "./app.module";
diff --git a/e2e/modal-navigation-ng/app/main.aot.ts b/e2e/modal-navigation-ng/app/main.aot.ts
index fef7c8714..bd0970ba9 100644
--- a/e2e/modal-navigation-ng/app/main.aot.ts
+++ b/e2e/modal-navigation-ng/app/main.aot.ts
@@ -1,7 +1,7 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
import { AppModule } from "./app.module";
-import { NativeScriptPlatformRef } from "nativescript-angular";
+import { NativeScriptPlatformRef } from "@nativescript/angular";
// "./app.module.ngfactory" is a dynamically generated module when compiled with AoT.
import { AppModuleNgFactory } from "./app.module.ngfactory";
diff --git a/e2e/modal-navigation-ng/app/main.ts b/e2e/modal-navigation-ng/app/main.ts
index 9e19c0134..36e8adda7 100644
--- a/e2e/modal-navigation-ng/app/main.ts
+++ b/e2e/modal-navigation-ng/app/main.ts
@@ -1,8 +1,8 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
import { AppModule } from "./app.module";
-import { NativeScriptPlatformRef } from "nativescript-angular";
+import { NativeScriptPlatformRef } from "@nativescript/angular";
AppModule.platformRef = platformNativeScriptDynamic();
AppModule.platformRef.bootstrapModule(AppModule);
\ No newline at end of file
diff --git a/e2e/modal-navigation-ng/app/modal-nested/modal-nested.component.ts b/e2e/modal-navigation-ng/app/modal-nested/modal-nested.component.ts
index 89cb66c56..4dd3c7ee6 100644
--- a/e2e/modal-navigation-ng/app/modal-nested/modal-nested.component.ts
+++ b/e2e/modal-navigation-ng/app/modal-nested/modal-nested.component.ts
@@ -1,6 +1,6 @@
import { Component } from "@angular/core";
-import { View, ShownModallyData } from "tns-core-modules/ui/core/view"
-import { ModalDialogParams } from "nativescript-angular/directives/dialogs";
+import { View, ShownModallyData } from "@nativescript/core/ui/core/view"
+import { ModalDialogParams } from "@nativescript/angular/directives/dialogs";
@Component({
moduleId: module.id,
diff --git a/e2e/modal-navigation-ng/app/modal-second/modal-second.component.ts b/e2e/modal-navigation-ng/app/modal-second/modal-second.component.ts
index 7b69233e6..245a23a54 100644
--- a/e2e/modal-navigation-ng/app/modal-second/modal-second.component.ts
+++ b/e2e/modal-navigation-ng/app/modal-second/modal-second.component.ts
@@ -1,7 +1,7 @@
import { Component } from "@angular/core";
-import { View } from "tns-core-modules/ui/core/view"
+import { View } from "@nativescript/core/ui/core/view"
import { ActivatedRoute } from "@angular/router";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
@Component({
moduleId: module.id,
@@ -11,7 +11,7 @@ import { RouterExtensions } from "nativescript-angular/router";
export class ModalSecondComponent {
constructor(private routerExtension: RouterExtensions, private activeRoute: ActivatedRoute) { }
- onLoaded() {
+ onLoaded(args) {
console.log("modal-second loaded");
}
diff --git a/e2e/modal-navigation-ng/app/modal-shared/modal-shared-second.component.ts b/e2e/modal-navigation-ng/app/modal-shared/modal-shared-second.component.ts
index 26e1b7bcc..5b8099703 100644
--- a/e2e/modal-navigation-ng/app/modal-shared/modal-shared-second.component.ts
+++ b/e2e/modal-navigation-ng/app/modal-shared/modal-shared-second.component.ts
@@ -1,9 +1,9 @@
import { Component } from "@angular/core";
-import { ModalDialogOptions, ModalDialogService } from "nativescript-angular/modal-dialog";
+import { ModalDialogOptions, ModalDialogService } from "@nativescript/angular/modal-dialog";
import { ViewContainerRefService } from "../shared/ViewContainerRefService";
import { ModalViewComponent } from "../modal-shared/modal-view.component";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
@Component({
selector: "ns-second",
diff --git a/e2e/modal-navigation-ng/app/modal-shared/modal-view-content.component.ts b/e2e/modal-navigation-ng/app/modal-shared/modal-view-content.component.ts
index f194354bf..d1e0a8ef2 100644
--- a/e2e/modal-navigation-ng/app/modal-shared/modal-view-content.component.ts
+++ b/e2e/modal-navigation-ng/app/modal-shared/modal-view-content.component.ts
@@ -1,5 +1,5 @@
import { Component } from "@angular/core";
-import { ModalDialogParams } from "nativescript-angular/modal-dialog";
+import { ModalDialogParams } from "@nativescript/angular/modal-dialog";
@Component({
selector: "ModalViewContent",
diff --git a/e2e/modal-navigation-ng/app/modal-shared/modal-view.component.ts b/e2e/modal-navigation-ng/app/modal-shared/modal-view.component.ts
index 7089b8e14..e05981c1b 100644
--- a/e2e/modal-navigation-ng/app/modal-shared/modal-view.component.ts
+++ b/e2e/modal-navigation-ng/app/modal-shared/modal-view.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
@Component({
selector: "ModalView",
diff --git a/e2e/modal-navigation-ng/app/modal/modal-router/modal-router.component.ts b/e2e/modal-navigation-ng/app/modal/modal-router/modal-router.component.ts
index 268235e5b..d79059d5d 100644
--- a/e2e/modal-navigation-ng/app/modal/modal-router/modal-router.component.ts
+++ b/e2e/modal-navigation-ng/app/modal/modal-router/modal-router.component.ts
@@ -1,7 +1,7 @@
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
-import { RouterExtensions } from "nativescript-angular/router";
-import { ModalDialogParams } from "nativescript-angular/directives/dialogs";
+import { RouterExtensions } from "@nativescript/angular/router";
+import { ModalDialogParams } from "@nativescript/angular/directives/dialogs";
@Component({
moduleId: module.id,
diff --git a/e2e/modal-navigation-ng/app/modal/modal.component.ts b/e2e/modal-navigation-ng/app/modal/modal.component.ts
index a7caca12a..f5f7c26fd 100644
--- a/e2e/modal-navigation-ng/app/modal/modal.component.ts
+++ b/e2e/modal-navigation-ng/app/modal/modal.component.ts
@@ -1,9 +1,9 @@
import { Component, ViewContainerRef } from "@angular/core";
-import { ModalDialogParams, ModalDialogOptions, ModalDialogService } from "nativescript-angular/directives/dialogs";
-import { RouterExtensions, PageRoute } from "nativescript-angular/router";
+import { ModalDialogParams, ModalDialogOptions, ModalDialogService } from "@nativescript/angular/directives/dialogs";
+import { RouterExtensions, PageRoute } from "@nativescript/angular/router";
import { ActivatedRoute } from "@angular/router";
-import { View, ShownModallyData, EventData } from "tns-core-modules/ui/core/view"
-import { confirm } from "tns-core-modules/ui/dialogs";
+import { View, ShownModallyData, EventData } from "@nativescript/core/ui/core/view"
+import { confirm } from "@nativescript/core/ui/dialogs";
import { ModalRouterComponent } from "../modal/modal-router/modal-router.component";
import { NestedModalComponent } from "../modal-nested/modal-nested.component";
diff --git a/e2e/modal-navigation-ng/app/named-router.component.ts b/e2e/modal-navigation-ng/app/named-router.component.ts
index 745ed6f11..69fbfc851 100644
--- a/e2e/modal-navigation-ng/app/named-router.component.ts
+++ b/e2e/modal-navigation-ng/app/named-router.component.ts
@@ -1,10 +1,10 @@
import { Component, ViewContainerRef } from "@angular/core";
import { Router, NavigationEnd } from "@angular/router";
-import { NSLocationStrategy } from "nativescript-angular/router/ns-location-strategy";
+import { NSLocationStrategy } from "@nativescript/angular";
import { ViewContainerRefService } from "./shared/ViewContainerRefService";
import { AppModule } from "./app.module";
-import { ModalDialogOptions, ModalDialogService } from "nativescript-angular";
+import { ModalDialogOptions, ModalDialogService } from "@nativescript/angular";
import { ModalViewComponent } from "./modal-shared/modal-view.component";
@Component({
diff --git a/e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts b/e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts
index bf194fb2f..59460cb78 100644
--- a/e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts
+++ b/e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts
@@ -1,13 +1,15 @@
import { Component, ViewContainerRef, Input, ViewChild, ElementRef } from "@angular/core";
import { Router, NavigationEnd } from "@angular/router";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
import { ModalComponent } from "../modal/modal.component";
import { ModalRouterComponent } from "../modal/modal-router/modal-router.component";
-import { confirm } from "tns-core-modules/ui/dialogs";
+import { confirm } from "@nativescript/core/ui/dialogs";
import { ViewContainerRefService } from "../shared/ViewContainerRefService";
import { ModalViewComponent } from "~/modal-shared/modal-view.component";
+declare var UIModalPresentationStyle;
+
@Component({
selector: "basic-nav",
template: `
diff --git a/e2e/modal-navigation-ng/app/navigation/root.section.component.ts b/e2e/modal-navigation-ng/app/navigation/root.section.component.ts
index a6f1b360d..cc8dab627 100644
--- a/e2e/modal-navigation-ng/app/navigation/root.section.component.ts
+++ b/e2e/modal-navigation-ng/app/navigation/root.section.component.ts
@@ -9,22 +9,22 @@ import { AppModule } from "../app.module";
export class RootSectionComponent {
constructor() { }
- onFrameRootViewReset(showModal) {
+ onFrameRootViewReset(showModal?: boolean) {
AppModule.root = showModal ? "page-router-modal" : "page-router";
AppModule.platformRef._livesync();
}
- onNamedFrameRootViewReset(showModal) {
+ onNamedFrameRootViewReset(showModal?: boolean) {
AppModule.root = showModal ? "named-page-router-modal" : "named-page-router";
AppModule.platformRef._livesync();
}
- onTabRootViewReset(showModal) {
+ onTabRootViewReset(showModal?: boolean) {
AppModule.root = showModal ? "tab-modal" : "tab";
AppModule.platformRef._livesync();
}
- onLayoutRootViewReset(showModal) {
+ onLayoutRootViewReset(showModal?: boolean) {
AppModule.root = showModal ? "layout-modal" : "layout";
AppModule.platformRef._livesync();
}
diff --git a/e2e/modal-navigation-ng/app/second/second.component.ts b/e2e/modal-navigation-ng/app/second/second.component.ts
index dc048a5ac..b0d1d0f5c 100644
--- a/e2e/modal-navigation-ng/app/second/second.component.ts
+++ b/e2e/modal-navigation-ng/app/second/second.component.ts
@@ -1,11 +1,11 @@
import { Component, ViewContainerRef } from "@angular/core";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
-import { EventData } from "tns-core-modules/data/observable";
-import { Frame } from "tns-core-modules/ui/frame";
-import { View } from "tns-core-modules/ui/core/view";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
+import { EventData } from "@nativescript/core/data/observable";
+import { Frame } from "@nativescript/core/ui/frame";
+import { View } from "@nativescript/core/ui/core/view";
import { ModalRouterComponent } from "../modal/modal-router/modal-router.component";
-import { PageRouterOutlet } from "nativescript-angular/router/page-router-outlet";
-import { RouterExtensions } from "nativescript-angular/router";
+import { PageRouterOutlet } from "@nativescript/angular/router/page-router-outlet";
+import { RouterExtensions } from "@nativescript/angular/router";
import { ModalComponent } from "../modal/modal.component";
import { AppModule } from "../app.module";
@Component({
diff --git a/e2e/modal-navigation-ng/app/tab.component.ts b/e2e/modal-navigation-ng/app/tab.component.ts
index b72c056dc..b0afb94e3 100644
--- a/e2e/modal-navigation-ng/app/tab.component.ts
+++ b/e2e/modal-navigation-ng/app/tab.component.ts
@@ -1,10 +1,10 @@
import { Component, ViewContainerRef } from "@angular/core";
import { Router, NavigationEnd } from "@angular/router";
-import { NSLocationStrategy } from "nativescript-angular/router/ns-location-strategy";
+import { NSLocationStrategy } from "@nativescript/angular";
import { ViewContainerRefService } from "./shared/ViewContainerRefService";
import { AppModule } from "./app.module";
-import { ModalDialogOptions, ModalDialogService } from "nativescript-angular";
+import { ModalDialogOptions, ModalDialogService } from "@nativescript/angular";
import { ModalViewComponent } from "./modal-shared/modal-view.component";
@Component({
diff --git a/e2e/modal-navigation-ng/ngcc.config.js b/e2e/modal-navigation-ng/ngcc.config.js
new file mode 100644
index 000000000..2d2413164
--- /dev/null
+++ b/e2e/modal-navigation-ng/ngcc.config.js
@@ -0,0 +1,19 @@
+module.exports = {
+ packages: {
+ "@nativescript/angular": {
+ entryPoints: {
+ ".": {
+ override: {
+ main: "./index.js",
+ typings: "./index.d.ts",
+ },
+ ignoreMissingDependencies: true,
+ }
+ },
+ ignorableDeepImportMatchers: [
+ /tns-core-modules\//,
+ /@nativescript\/core\//,
+ ]
+ }
+ }
+};
\ No newline at end of file
diff --git a/e2e/modal-navigation-ng/package.json b/e2e/modal-navigation-ng/package.json
index 5bd81ea31..e842b3019 100644
--- a/e2e/modal-navigation-ng/package.json
+++ b/e2e/modal-navigation-ng/package.json
@@ -13,24 +13,24 @@
}
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular/compiler-cli": "~8.2.0",
- "@ngtools/webpack": "~8.2.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@ngtools/webpack": "~9.1.0",
"@types/chai": "~4.1.7",
"@types/mocha": "~5.2.5",
"@types/node": "~10.12.18",
@@ -44,10 +44,14 @@
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
"tns-platform-declarations": "next",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.3"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
- "e2e-watch": "tsc -p e2e --watch"
+ "e2e-watch": "tsc -p e2e --watch",
+ "clean": "npx rimraf hooks node_modules package-lock.json",
+ "setup": "cd ../../nativescript-angular && npm run pack && cd ../e2e/animation-examples && npm run clean",
+ "ngcc": "ngcc --properties es2015 module main --first-only",
+ "postinstall": "npm run ngcc"
}
}
diff --git a/e2e/modal-navigation-ng/references.d.ts b/e2e/modal-navigation-ng/references.d.ts
index b945d69c5..992a504a0 100644
--- a/e2e/modal-navigation-ng/references.d.ts
+++ b/e2e/modal-navigation-ng/references.d.ts
@@ -1 +1,2 @@
-///
\ No newline at end of file
+///
+///
\ No newline at end of file
diff --git a/e2e/modal-navigation-ng/tsconfig.esm.json b/e2e/modal-navigation-ng/tsconfig.esm.json
index 95f2ecee0..a96f6bbc6 100644
--- a/e2e/modal-navigation-ng/tsconfig.esm.json
+++ b/e2e/modal-navigation-ng/tsconfig.esm.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
- "module": "es2015",
+ "module": "ESNext",
"moduleResolution": "node"
}
}
diff --git a/e2e/modal-navigation-ng/tsconfig.json b/e2e/modal-navigation-ng/tsconfig.json
index eee1eca47..1d8622eed 100644
--- a/e2e/modal-navigation-ng/tsconfig.json
+++ b/e2e/modal-navigation-ng/tsconfig.json
@@ -1,41 +1,34 @@
{
- "compilerOptions": {
- "module": "commonjs",
- "target": "es5",
- "experimentalDecorators": true,
- "emitDecoratorMetadata": true,
- "noEmitHelpers": true,
- "noEmitOnError": true,
- "lib": [
- "es6",
- "dom",
- "es2015.iterable"
- ],
- "baseUrl": ".",
- "paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
- "~/*": [
- "app/*"
- ]
- }
- },
- "include": [
- "../../nativescript-angular-package",
- "../../nativescript-angular",
- "**/*"
- ],
- "exclude": [
- "../../nativescript-angular-package/node_modules",
- "../../nativescript-angular-package/**/*.d.ts",
- "../../nativescript-angular/node_modules",
- "../../nativescript-angular/**/*.d.ts",
- "node_modules",
- "platforms",
- "**/*.aot",
- "e2e"
- ]
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es5",
+ "experimentalDecorators": true,
+ "emitDecoratorMetadata": true,
+ "noEmitHelpers": true,
+ "noEmitOnError": true,
+ "skipLibCheck": true,
+ "lib": [
+ "es2017",
+ "dom",
+ "es6"
+ ],
+ "baseUrl": ".",
+ "paths": {
+ "~/*": [
+ "app/*"
+ ]
+ }
+ },
+ "includes": [
+ "./references.d.ts"
+ ],
+ "files": [
+ "./app/main.ts"
+ ],
+ "exclude": [
+ "node_modules",
+ "platforms",
+ "**/*.aot",
+ "e2e"
+ ]
}
\ No newline at end of file
diff --git a/e2e/nested-router-tab-view/app/about/about.component.ts b/e2e/nested-router-tab-view/app/about/about.component.ts
index 75eb5b55e..f1132181c 100644
--- a/e2e/nested-router-tab-view/app/about/about.component.ts
+++ b/e2e/nested-router-tab-view/app/about/about.component.ts
@@ -1,5 +1,5 @@
import { Component } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { ActivatedRoute } from "@angular/router";
@Component({
diff --git a/e2e/nested-router-tab-view/app/app.component.ts b/e2e/nested-router-tab-view/app/app.component.ts
index 7c18980d7..8a132b0a1 100644
--- a/e2e/nested-router-tab-view/app/app.component.ts
+++ b/e2e/nested-router-tab-view/app/app.component.ts
@@ -1,7 +1,7 @@
import { Component, OnInit, AfterViewInit, AfterContentInit, ViewChild } from "@angular/core";
-import { TabViewDirective } from "nativescript-angular/directives";
+import { TabViewDirective } from "@nativescript/angular/directives";
import { Router, NavigationEnd } from "@angular/router";
-import { NSLocationStrategy } from "nativescript-angular/router/ns-location-strategy";
+import { NSLocationStrategy } from "@nativescript/angular";
@Component({
diff --git a/e2e/nested-router-tab-view/app/app.module.ts b/e2e/nested-router-tab-view/app/app.module.ts
index 1c406632a..acb5e56fb 100644
--- a/e2e/nested-router-tab-view/app/app.module.ts
+++ b/e2e/nested-router-tab-view/app/app.module.ts
@@ -1,14 +1,14 @@
import { NgModule, NO_ERRORS_SCHEMA, ErrorHandler, NgModuleFactoryLoader } from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
+import { NativeScriptModule } from "@nativescript/angular";
import { AppRoutingModule, COMPONENTS, MODALCOMPONENTS } from "./app.routing";
import { AppComponent } from "./app.component";
import { DataService } from "./data.service";
-import { NSModuleFactoryLoader } from "nativescript-angular/router";
+import { NSModuleFactoryLoader } from "@nativescript/angular/router";
import { SharedModule } from "./shared.module";
-import { enable as traceEnable, addCategories } from "tns-core-modules/trace";
-import { routerTraceCategory } from "nativescript-angular/trace";
+import { enable as traceEnable, addCategories } from "@nativescript/core/trace";
+import { routerTraceCategory } from "@nativescript/angular/trace";
// addCategories(routerTraceCategory);
traceEnable();
diff --git a/e2e/nested-router-tab-view/app/app.routing.ts b/e2e/nested-router-tab-view/app/app.routing.ts
index 50d824095..745991f51 100644
--- a/e2e/nested-router-tab-view/app/app.routing.ts
+++ b/e2e/nested-router-tab-view/app/app.routing.ts
@@ -1,5 +1,5 @@
import { NgModule } from "@angular/core";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { Routes } from "@angular/router";
import { PlayerComponent } from "./player/players.component";
diff --git a/e2e/nested-router-tab-view/app/custom-tabs/custom-tabs.component.ts b/e2e/nested-router-tab-view/app/custom-tabs/custom-tabs.component.ts
index 18ca7663b..d46cb3d2b 100644
--- a/e2e/nested-router-tab-view/app/custom-tabs/custom-tabs.component.ts
+++ b/e2e/nested-router-tab-view/app/custom-tabs/custom-tabs.component.ts
@@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core';
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
-import { RouterExtensions } from "nativescript-angular/router";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
+import { RouterExtensions } from "@nativescript/angular/router";
import { ActivatedRoute } from "@angular/router";
-import { confirm } from "tns-core-modules/ui/dialogs";
+import { confirm } from "@nativescript/core/ui/dialogs";
import { Page } from 'tns-core-modules/ui/page/page';
@Component({
diff --git a/e2e/nested-router-tab-view/app/home-lazy/home-lazy.module.ts b/e2e/nested-router-tab-view/app/home-lazy/home-lazy.module.ts
index ea82d7ea2..a331ba054 100644
--- a/e2e/nested-router-tab-view/app/home-lazy/home-lazy.module.ts
+++ b/e2e/nested-router-tab-view/app/home-lazy/home-lazy.module.ts
@@ -1,8 +1,8 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { Route } from "@angular/router";
-import { NativeScriptCommonModule } from "nativescript-angular/common";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { PlayerComponent } from "../player/players.component";
import { PlayerDetailComponent } from "../player/player-detail.component";
import { TeamsComponent } from "../team/teams.component";
diff --git a/e2e/nested-router-tab-view/app/home/home.component.ts b/e2e/nested-router-tab-view/app/home/home.component.ts
index 9ad9c71cd..d0e7cdcb3 100644
--- a/e2e/nested-router-tab-view/app/home/home.component.ts
+++ b/e2e/nested-router-tab-view/app/home/home.component.ts
@@ -1,8 +1,8 @@
import { Component, ViewContainerRef } from "@angular/core";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
-import { RouterExtensions } from "nativescript-angular/router";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
+import { RouterExtensions } from "@nativescript/angular/router";
import { ActivatedRoute } from "@angular/router";
-import { confirm } from "tns-core-modules/ui/dialogs";
+import { confirm } from "@nativescript/core/ui/dialogs";
@Component({
moduleId: module.id,
diff --git a/e2e/nested-router-tab-view/app/login/login.component.ts b/e2e/nested-router-tab-view/app/login/login.component.ts
index 98574863d..6eee0a982 100644
--- a/e2e/nested-router-tab-view/app/login/login.component.ts
+++ b/e2e/nested-router-tab-view/app/login/login.component.ts
@@ -1,8 +1,8 @@
import { Component, ViewContainerRef } from "@angular/core";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
-import { RouterExtensions } from "nativescript-angular/router";
-import { EventData } from "tns-core-modules/data/observable";
-import { confirm } from "tns-core-modules/ui/dialogs";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
+import { RouterExtensions } from "@nativescript/angular/router";
+import { EventData } from "@nativescript/core/data/observable";
+import { confirm } from "@nativescript/core/ui/dialogs";
import { AppModule } from "../app.module";
diff --git a/e2e/nested-router-tab-view/app/main.aot.ts b/e2e/nested-router-tab-view/app/main.aot.ts
index d5ff77a77..97a9312ed 100644
--- a/e2e/nested-router-tab-view/app/main.aot.ts
+++ b/e2e/nested-router-tab-view/app/main.aot.ts
@@ -1,5 +1,5 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
// "./app.module.ngfactory" is a dynamically generated module when compiled with AoT.
import { AppModuleNgFactory } from "./app.module.ngfactory";
diff --git a/e2e/nested-router-tab-view/app/main.ts b/e2e/nested-router-tab-view/app/main.ts
index a84cb8844..f61a19110 100644
--- a/e2e/nested-router-tab-view/app/main.ts
+++ b/e2e/nested-router-tab-view/app/main.ts
@@ -1,5 +1,5 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
import { AppModule } from "./app.module";
diff --git a/e2e/nested-router-tab-view/app/modal-nested/modal-nested.component.ts b/e2e/nested-router-tab-view/app/modal-nested/modal-nested.component.ts
index 89cb66c56..4dd3c7ee6 100644
--- a/e2e/nested-router-tab-view/app/modal-nested/modal-nested.component.ts
+++ b/e2e/nested-router-tab-view/app/modal-nested/modal-nested.component.ts
@@ -1,6 +1,6 @@
import { Component } from "@angular/core";
-import { View, ShownModallyData } from "tns-core-modules/ui/core/view"
-import { ModalDialogParams } from "nativescript-angular/directives/dialogs";
+import { View, ShownModallyData } from "@nativescript/core/ui/core/view"
+import { ModalDialogParams } from "@nativescript/angular/directives/dialogs";
@Component({
moduleId: module.id,
diff --git a/e2e/nested-router-tab-view/app/modal-second/modal-second.component.ts b/e2e/nested-router-tab-view/app/modal-second/modal-second.component.ts
index 819a73f78..3eb901a0d 100644
--- a/e2e/nested-router-tab-view/app/modal-second/modal-second.component.ts
+++ b/e2e/nested-router-tab-view/app/modal-second/modal-second.component.ts
@@ -1,7 +1,7 @@
import { Component } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
-import { View, EventData } from "tns-core-modules/ui/core/view"
-import { RouterExtensions } from "nativescript-angular/router";
+import { View, EventData } from "@nativescript/core/ui/core/view"
+import { RouterExtensions } from "@nativescript/angular/router";
@Component({
moduleId: module.id,
diff --git a/e2e/nested-router-tab-view/app/modal/modal-router/modal-router.component.ts b/e2e/nested-router-tab-view/app/modal/modal-router/modal-router.component.ts
index f3be5f96e..4c7105224 100644
--- a/e2e/nested-router-tab-view/app/modal/modal-router/modal-router.component.ts
+++ b/e2e/nested-router-tab-view/app/modal/modal-router/modal-router.component.ts
@@ -1,7 +1,7 @@
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
-import { RouterExtensions } from "nativescript-angular/router";
-import { ModalDialogParams } from "nativescript-angular/directives/dialogs";
+import { RouterExtensions } from "@nativescript/angular/router";
+import { ModalDialogParams } from "@nativescript/angular/directives/dialogs";
@Component({
moduleId: module.id,
diff --git a/e2e/nested-router-tab-view/app/modal/modal.component.ts b/e2e/nested-router-tab-view/app/modal/modal.component.ts
index fc5068b2b..1b799c191 100644
--- a/e2e/nested-router-tab-view/app/modal/modal.component.ts
+++ b/e2e/nested-router-tab-view/app/modal/modal.component.ts
@@ -1,9 +1,9 @@
import { Component, ViewContainerRef } from "@angular/core";
-import { ModalDialogParams, ModalDialogOptions, ModalDialogService } from "nativescript-angular/directives/dialogs";
-import { RouterExtensions, PageRoute } from "nativescript-angular/router";
+import { ModalDialogParams, ModalDialogOptions, ModalDialogService } from "@nativescript/angular/directives/dialogs";
+import { RouterExtensions, PageRoute } from "@nativescript/angular/router";
import { ActivatedRoute } from "@angular/router";
-import { View, ShownModallyData } from "tns-core-modules/ui/core/view"
-import { confirm } from "tns-core-modules/ui/dialogs";
+import { View, ShownModallyData } from "@nativescript/core/ui/core/view"
+import { confirm } from "@nativescript/core/ui/dialogs";
import { ModalRouterComponent } from "../modal/modal-router/modal-router.component";
import { NestedModalComponent } from "../modal-nested/modal-nested.component";
diff --git a/e2e/nested-router-tab-view/app/player/player-detail.component.ts b/e2e/nested-router-tab-view/app/player/player-detail.component.ts
index 4155a1b54..c9b431d12 100644
--- a/e2e/nested-router-tab-view/app/player/player-detail.component.ts
+++ b/e2e/nested-router-tab-view/app/player/player-detail.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { DataService, DataItem } from "../data.service";
import { Subscription } from "rxjs";
diff --git a/e2e/nested-router-tab-view/app/player/players.component.ts b/e2e/nested-router-tab-view/app/player/players.component.ts
index b24ef18bd..65ca694b7 100644
--- a/e2e/nested-router-tab-view/app/player/players.component.ts
+++ b/e2e/nested-router-tab-view/app/player/players.component.ts
@@ -1,7 +1,7 @@
import { Component, OnInit, ViewContainerRef } from "@angular/core";
import { DataService, DataItem } from "../data.service";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
import { ModalRouterComponent } from "../modal/modal-router/modal-router.component";
@Component({
selector: "ns-players",
diff --git a/e2e/nested-router-tab-view/app/shared.module.ts b/e2e/nested-router-tab-view/app/shared.module.ts
index be7d8a867..a26b47d0d 100644
--- a/e2e/nested-router-tab-view/app/shared.module.ts
+++ b/e2e/nested-router-tab-view/app/shared.module.ts
@@ -1,9 +1,9 @@
import { NgModule, NO_ERRORS_SCHEMA, ErrorHandler, NgModuleFactoryLoader } from "@angular/core";
-// import { NativeScriptModule } from "nativescript-angular/nativescript.module";
+// import { NativeScriptModule } from "@nativescript/angular";
// import { AppRoutingModule, COMPONENTS } from "./app.routing";
// import { AppComponent } from "./app.component";
-import { NativeScriptCommonModule } from "nativescript-angular/common";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { DataService } from "./data.service";
import { HomeComponent } from "./home/home.component";
diff --git a/e2e/nested-router-tab-view/app/tabs/tabs.component.ts b/e2e/nested-router-tab-view/app/tabs/tabs.component.ts
index df5e2d619..35dd5fc13 100644
--- a/e2e/nested-router-tab-view/app/tabs/tabs.component.ts
+++ b/e2e/nested-router-tab-view/app/tabs/tabs.component.ts
@@ -1,10 +1,10 @@
import { Component, ViewContainerRef } from "@angular/core";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs";
-import { RouterExtensions } from "nativescript-angular/router";
-import { EventData } from "tns-core-modules/data/observable";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular/directives/dialogs";
+import { RouterExtensions } from "@nativescript/angular/router";
+import { EventData } from "@nativescript/core/data/observable";
import { ActivatedRoute } from "@angular/router";
-import { confirm } from "tns-core-modules/ui/dialogs";
-import { Page } from "tns-core-modules/ui/page";
+import { confirm } from "@nativescript/core/ui/dialogs";
+import { Page } from "@nativescript/core/ui/page";
import { AppModule } from "../app.module";
@Component({
diff --git a/e2e/nested-router-tab-view/app/team/team-detail.component.ts b/e2e/nested-router-tab-view/app/team/team-detail.component.ts
index e4d92b232..1bb7c3f85 100644
--- a/e2e/nested-router-tab-view/app/team/team-detail.component.ts
+++ b/e2e/nested-router-tab-view/app/team/team-detail.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { DataService, DataItem } from "../data.service";
import { Subscription } from "rxjs";
diff --git a/e2e/nested-router-tab-view/package.json b/e2e/nested-router-tab-view/package.json
index 6e78669c1..284f802b1 100644
--- a/e2e/nested-router-tab-view/package.json
+++ b/e2e/nested-router-tab-view/package.json
@@ -4,27 +4,30 @@
"readme": "NativeScript Application",
"repository": "",
"nativescript": {
- "id": "org.nativescript.nestedroutertabview"
+ "id": "org.nativescript.nestedroutertabview",
+ "tns-ios": {
+ "version": "6.5.1"
+ }
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular/compiler-cli": "~8.2.0",
- "@ngtools/webpack": "~8.2.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@ngtools/webpack": "~9.1.0",
"@types/chai": "~4.1.7",
"@types/mocha": "~5.2.5",
"@types/node": "~10.12.18",
@@ -37,10 +40,15 @@
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.3"
},
"scripts": {
+ "compile-tests": "tsc -p e2e --watch",
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
- "compile-tests": "tsc -p e2e --watch"
+ "e2e-watch": "tsc -p e2e --watch",
+ "clean": "npx rimraf hooks node_modules package-lock.json",
+ "setup": "cd ../../nativescript-angular && npm run pack && cd ../e2e/animation-examples && npm run clean",
+ "ngcc": "ngcc --properties es2015 module main --first-only",
+ "postinstall": "npm run ngcc"
}
}
diff --git a/e2e/nested-router-tab-view/tsconfig.json b/e2e/nested-router-tab-view/tsconfig.json
index eee1eca47..1d8622eed 100644
--- a/e2e/nested-router-tab-view/tsconfig.json
+++ b/e2e/nested-router-tab-view/tsconfig.json
@@ -1,41 +1,34 @@
{
- "compilerOptions": {
- "module": "commonjs",
- "target": "es5",
- "experimentalDecorators": true,
- "emitDecoratorMetadata": true,
- "noEmitHelpers": true,
- "noEmitOnError": true,
- "lib": [
- "es6",
- "dom",
- "es2015.iterable"
- ],
- "baseUrl": ".",
- "paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
- "~/*": [
- "app/*"
- ]
- }
- },
- "include": [
- "../../nativescript-angular-package",
- "../../nativescript-angular",
- "**/*"
- ],
- "exclude": [
- "../../nativescript-angular-package/node_modules",
- "../../nativescript-angular-package/**/*.d.ts",
- "../../nativescript-angular/node_modules",
- "../../nativescript-angular/**/*.d.ts",
- "node_modules",
- "platforms",
- "**/*.aot",
- "e2e"
- ]
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "es5",
+ "experimentalDecorators": true,
+ "emitDecoratorMetadata": true,
+ "noEmitHelpers": true,
+ "noEmitOnError": true,
+ "skipLibCheck": true,
+ "lib": [
+ "es2017",
+ "dom",
+ "es6"
+ ],
+ "baseUrl": ".",
+ "paths": {
+ "~/*": [
+ "app/*"
+ ]
+ }
+ },
+ "includes": [
+ "./references.d.ts"
+ ],
+ "files": [
+ "./app/main.ts"
+ ],
+ "exclude": [
+ "node_modules",
+ "platforms",
+ "**/*.aot",
+ "e2e"
+ ]
}
\ No newline at end of file
diff --git a/e2e/nested-router-tab-view/tsconfig.tns.json b/e2e/nested-router-tab-view/tsconfig.tns.json
index 95f2ecee0..a96f6bbc6 100644
--- a/e2e/nested-router-tab-view/tsconfig.tns.json
+++ b/e2e/nested-router-tab-view/tsconfig.tns.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
- "module": "es2015",
+ "module": "ESNext",
"moduleResolution": "node"
}
}
diff --git a/e2e/renderer/app/app-routing.module.ts b/e2e/renderer/app/app-routing.module.ts
index 61a49f6a5..04ab25978 100644
--- a/e2e/renderer/app/app-routing.module.ts
+++ b/e2e/renderer/app/app-routing.module.ts
@@ -1,5 +1,5 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptRouterModule, NSEmptyOutletComponent } from "nativescript-angular/router";
+import { NativeScriptRouterModule, NSEmptyOutletComponent } from "@nativescript/angular/router";
import { ActionBarDynamicItemsComponent } from "./action-bar/action-bar-dynamic-items.component";
import { ActionBarExtensionComponent } from "./action-bar/action-bar-extension.component";
diff --git a/e2e/renderer/app/app.module.ts b/e2e/renderer/app/app.module.ts
index 1f170798e..3d8f3e5c1 100644
--- a/e2e/renderer/app/app.module.ts
+++ b/e2e/renderer/app/app.module.ts
@@ -1,5 +1,5 @@
import { NgModule, NO_ERRORS_SCHEMA, ErrorHandler } from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
+import { NativeScriptModule } from "@nativescript/angular";
import {
AppRoutingModule,
@@ -9,8 +9,8 @@ import {
import { AppComponent } from "./app.component";
import { ItemsService } from "./items.service";
-import { rendererTraceCategory, viewUtilCategory, bootstrapCategory } from "nativescript-angular/trace";
-import { addCategories, enable, categories } from "tns-core-modules/trace";
+import { rendererTraceCategory, viewUtilCategory, bootstrapCategory } from "@nativescript/angular/trace";
+import { addCategories, enable, categories } from "@nativescript/core/trace";
import { SharedModule } from "./shared.module";
addCategories(bootstrapCategory);
diff --git a/e2e/renderer/app/main.aot.ts b/e2e/renderer/app/main.aot.ts
index 98bf134fc..015f6e008 100644
--- a/e2e/renderer/app/main.aot.ts
+++ b/e2e/renderer/app/main.aot.ts
@@ -1,4 +1,4 @@
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
import { AppModuleNgFactory } from "./app.module.ngfactory";
platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);
diff --git a/e2e/renderer/app/main.ts b/e2e/renderer/app/main.ts
index 639bfd513..1b1b3c521 100644
--- a/e2e/renderer/app/main.ts
+++ b/e2e/renderer/app/main.ts
@@ -1,4 +1,4 @@
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
import { AppModule } from "./app.module";
platformNativeScriptDynamic().bootstrapModule(AppModule);
diff --git a/e2e/renderer/app/page-router-outlet/action-bar-visibility-always.component.ts b/e2e/renderer/app/page-router-outlet/action-bar-visibility-always.component.ts
index 35f95e923..2887fac3d 100644
--- a/e2e/renderer/app/page-router-outlet/action-bar-visibility-always.component.ts
+++ b/e2e/renderer/app/page-router-outlet/action-bar-visibility-always.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { ActivatedRoute } from "@angular/router";
@Component({
diff --git a/e2e/renderer/app/page-router-outlet/action-bar-visibility-auto.component.ts b/e2e/renderer/app/page-router-outlet/action-bar-visibility-auto.component.ts
index 2e7955479..b06225f2e 100644
--- a/e2e/renderer/app/page-router-outlet/action-bar-visibility-auto.component.ts
+++ b/e2e/renderer/app/page-router-outlet/action-bar-visibility-auto.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { ActivatedRoute } from "@angular/router";
@Component({
diff --git a/e2e/renderer/app/page-router-outlet/action-bar-visibility-never.component.ts b/e2e/renderer/app/page-router-outlet/action-bar-visibility-never.component.ts
index cd3a9258a..c0f7200ac 100644
--- a/e2e/renderer/app/page-router-outlet/action-bar-visibility-never.component.ts
+++ b/e2e/renderer/app/page-router-outlet/action-bar-visibility-never.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { ActivatedRoute } from "@angular/router";
@Component({
diff --git a/e2e/renderer/app/page-router-outlet/nested-lazy-page.module.ts b/e2e/renderer/app/page-router-outlet/nested-lazy-page.module.ts
index 6a761a4ed..26d3ce76f 100644
--- a/e2e/renderer/app/page-router-outlet/nested-lazy-page.module.ts
+++ b/e2e/renderer/app/page-router-outlet/nested-lazy-page.module.ts
@@ -1,6 +1,6 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
-import { NativeScriptCommonModule } from "nativescript-angular/common";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
import { SharedModule } from "~/shared.module";
import { NestedPageComponent } from "./nested-page.component";
diff --git a/e2e/renderer/app/shared.module.ts b/e2e/renderer/app/shared.module.ts
index b36208dc3..d8e40bd32 100644
--- a/e2e/renderer/app/shared.module.ts
+++ b/e2e/renderer/app/shared.module.ts
@@ -1,6 +1,6 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
-import { NativeScriptCommonModule } from "nativescript-angular/common";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
import { NestedPageComponent } from "./page-router-outlet/nested-page.component";
@NgModule({
diff --git a/e2e/renderer/app/tab-view/tab-item-binding.component.ts b/e2e/renderer/app/tab-view/tab-item-binding.component.ts
index 3f301dbc2..f99f45b7e 100644
--- a/e2e/renderer/app/tab-view/tab-item-binding.component.ts
+++ b/e2e/renderer/app/tab-view/tab-item-binding.component.ts
@@ -1,5 +1,5 @@
import { Component } from "@angular/core";
-import { isAndroid } from "tns-core-modules/platform";
+import { isAndroid } from "@nativescript/core/platform";
function getIconSource(icon: string): string {
const iconPrefix = isAndroid ? "res://" : "res://tabIcons/";
diff --git a/e2e/renderer/package.json b/e2e/renderer/package.json
index 4b03e0682..f6fe8e90d 100644
--- a/e2e/renderer/package.json
+++ b/e2e/renderer/package.json
@@ -7,24 +7,24 @@
"id": "org.nativescript.renderer"
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular/compiler-cli": "~8.2.0",
- "@ngtools/webpack": "~8.2.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@ngtools/webpack": "~9.1.0",
"@types/chai": "~4.1.7",
"@types/mocha": "~5.2.5",
"@types/node": "~10.12.18",
@@ -37,7 +37,7 @@
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.3"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
diff --git a/e2e/renderer/tsconfig.json b/e2e/renderer/tsconfig.json
index eee1eca47..a3ba8b51a 100644
--- a/e2e/renderer/tsconfig.json
+++ b/e2e/renderer/tsconfig.json
@@ -6,20 +6,19 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"baseUrl": ".",
"paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
"~/*": [
"app/*"
+ ],
+ "*": [
+ "./node_modules/*"
]
}
},
diff --git a/e2e/routable-animations/app/app-routing.module.ts b/e2e/routable-animations/app/app-routing.module.ts
index 8ce2788fe..c1f60b84c 100644
--- a/e2e/routable-animations/app/app-routing.module.ts
+++ b/e2e/routable-animations/app/app-routing.module.ts
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { Routes } from '@angular/router';
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { HomeComponent } from './home/home.component';
import { SupportComponent } from './support/support.component';
diff --git a/e2e/routable-animations/app/app.module.ts b/e2e/routable-animations/app/app.module.ts
index fd566ef7f..d0a7e9a6d 100644
--- a/e2e/routable-animations/app/app.module.ts
+++ b/e2e/routable-animations/app/app.module.ts
@@ -1,14 +1,14 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
-import { NativeScriptAnimationsModule } from "nativescript-angular/animations";
+import { NativeScriptModule } from "@nativescript/angular";
+import { NativeScriptAnimationsModule } from "@nativescript/angular/animations";
import { AppComponent } from "./app.component";
import { AppRoutingModule } from './app-routing.module';
import { HomeComponent } from './home/home.component';
import { SupportComponent } from './support/support.component';
-import { animationsTraceCategory } from "nativescript-angular/trace";
-import { setCategories, enable } from "trace";
+import { animationsTraceCategory } from "@nativescript/angular/trace";
+import { setCategories, enable } from "@nativescript/core/trace";
setCategories(animationsTraceCategory);
enable();
diff --git a/e2e/routable-animations/app/main.aot.ts b/e2e/routable-animations/app/main.aot.ts
index 98bf134fc..015f6e008 100644
--- a/e2e/routable-animations/app/main.aot.ts
+++ b/e2e/routable-animations/app/main.aot.ts
@@ -1,4 +1,4 @@
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
import { AppModuleNgFactory } from "./app.module.ngfactory";
platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);
diff --git a/e2e/routable-animations/app/main.ts b/e2e/routable-animations/app/main.ts
index 639bfd513..1b1b3c521 100644
--- a/e2e/routable-animations/app/main.ts
+++ b/e2e/routable-animations/app/main.ts
@@ -1,4 +1,4 @@
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
import { AppModule } from "./app.module";
platformNativeScriptDynamic().bootstrapModule(AppModule);
diff --git a/e2e/routable-animations/package.json b/e2e/routable-animations/package.json
index 381f54d74..103d69852 100644
--- a/e2e/routable-animations/package.json
+++ b/e2e/routable-animations/package.json
@@ -7,27 +7,27 @@
"id": "org.nativescript.nsroanimations"
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@ngtools/webpack": "~8.2.0",
- "@angular/compiler-cli": "~8.2.0",
+ "@ngtools/webpack": "~9.1.0",
+ "@angular/compiler-cli": "~9.1.0",
"@types/chai": "~4.1.3",
"@types/mocha": "~5.2.1",
- "@types/node": "^7.0.5",
+ "@types/node": "~10.12.18",
"babel-traverse": "6.25.0",
"babel-types": "6.25.0",
"babylon": "6.17.4",
@@ -39,7 +39,7 @@
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.3"
},
"scripts": {
"ns-bundle": "ns-bundle",
diff --git a/e2e/routable-animations/tsconfig.esm.json b/e2e/routable-animations/tsconfig.esm.json
index 95f2ecee0..a96f6bbc6 100644
--- a/e2e/routable-animations/tsconfig.esm.json
+++ b/e2e/routable-animations/tsconfig.esm.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
- "module": "es2015",
+ "module": "ESNext",
"moduleResolution": "node"
}
}
diff --git a/e2e/routable-animations/tsconfig.json b/e2e/routable-animations/tsconfig.json
index eee1eca47..a3ba8b51a 100644
--- a/e2e/routable-animations/tsconfig.json
+++ b/e2e/routable-animations/tsconfig.json
@@ -6,20 +6,19 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"baseUrl": ".",
"paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
"~/*": [
"app/*"
+ ],
+ "*": [
+ "./node_modules/*"
]
}
},
diff --git a/e2e/router-tab-view/app/app.component.ts b/e2e/router-tab-view/app/app.component.ts
index 20ccd80c4..385bd9c12 100644
--- a/e2e/router-tab-view/app/app.component.ts
+++ b/e2e/router-tab-view/app/app.component.ts
@@ -1,7 +1,7 @@
import { Component, ViewChild } from "@angular/core";
-import { TabViewDirective } from "nativescript-angular/directives";
+import { TabViewDirective } from "@nativescript/angular/directives";
import { Router, NavigationEnd } from "@angular/router";
-import { NSLocationStrategy } from "nativescript-angular/router/ns-location-strategy";
+import { NSLocationStrategy } from "@nativescript/angular";
@Component({
selector: "ns-app",
diff --git a/e2e/router-tab-view/app/app.module.ts b/e2e/router-tab-view/app/app.module.ts
index 632cdf76b..d6142a91a 100644
--- a/e2e/router-tab-view/app/app.module.ts
+++ b/e2e/router-tab-view/app/app.module.ts
@@ -1,11 +1,11 @@
import { NgModule, NO_ERRORS_SCHEMA, ErrorHandler } from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
+import { NativeScriptModule } from "@nativescript/angular";
import { AppRoutingModule, COMPONENTS } from "./app.routing";
import { AppComponent } from "./app.component";
import { DataService } from "./data.service";
-import { enable as traceEnable } from "tns-core-modules/trace";
+import { enable as traceEnable } from "@nativescript/core/trace";
// addCategories(routerTraceCategory);
traceEnable();
diff --git a/e2e/router-tab-view/app/app.routing.ts b/e2e/router-tab-view/app/app.routing.ts
index 64f157a47..82cab77a3 100644
--- a/e2e/router-tab-view/app/app.routing.ts
+++ b/e2e/router-tab-view/app/app.routing.ts
@@ -1,5 +1,5 @@
import { NgModule } from "@angular/core";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { Routes } from "@angular/router";
import { PlayerComponent } from "./player/players.component";
diff --git a/e2e/router-tab-view/app/main.aot.ts b/e2e/router-tab-view/app/main.aot.ts
index d5ff77a77..97a9312ed 100644
--- a/e2e/router-tab-view/app/main.aot.ts
+++ b/e2e/router-tab-view/app/main.aot.ts
@@ -1,5 +1,5 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
// "./app.module.ngfactory" is a dynamically generated module when compiled with AoT.
import { AppModuleNgFactory } from "./app.module.ngfactory";
diff --git a/e2e/router-tab-view/app/main.ts b/e2e/router-tab-view/app/main.ts
index a84cb8844..f61a19110 100644
--- a/e2e/router-tab-view/app/main.ts
+++ b/e2e/router-tab-view/app/main.ts
@@ -1,5 +1,5 @@
// this import should be first in order to load some required settings (like globals and reflect-metadata)
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
import { AppModule } from "./app.module";
diff --git a/e2e/router-tab-view/app/player/players.component.ts b/e2e/router-tab-view/app/player/players.component.ts
index fc9ba8575..934d76a45 100644
--- a/e2e/router-tab-view/app/player/players.component.ts
+++ b/e2e/router-tab-view/app/player/players.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit } from "@angular/core";
import { DataService, DataItem } from "../data.service";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
@Component({
selector: "ns-players",
diff --git a/e2e/router-tab-view/package.json b/e2e/router-tab-view/package.json
index fc1120b74..b2c52772b 100644
--- a/e2e/router-tab-view/package.json
+++ b/e2e/router-tab-view/package.json
@@ -7,20 +7,20 @@
"id": "org.nativescript.routertabview"
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
"@types/chai": "~4.1.7",
@@ -34,9 +34,9 @@
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
- "typescript": "~3.5.3",
- "@angular/compiler-cli": "~8.2.0",
- "@ngtools/webpack": "~8.2.0"
+ "typescript": "~3.8.3",
+ "@angular/compiler-cli": "~9.1.0",
+ "@ngtools/webpack": "~9.1.0"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
diff --git a/e2e/router-tab-view/tsconfig.json b/e2e/router-tab-view/tsconfig.json
index eee1eca47..a3ba8b51a 100644
--- a/e2e/router-tab-view/tsconfig.json
+++ b/e2e/router-tab-view/tsconfig.json
@@ -6,20 +6,19 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"baseUrl": ".",
"paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
"~/*": [
"app/*"
+ ],
+ "*": [
+ "./node_modules/*"
]
}
},
diff --git a/e2e/router/app/app-routing.module.ts b/e2e/router/app/app-routing.module.ts
index c4da4fec9..97fdedd1f 100644
--- a/e2e/router/app/app-routing.module.ts
+++ b/e2e/router/app/app-routing.module.ts
@@ -1,5 +1,5 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptRouterModule, NSEmptyOutletComponent } from "nativescript-angular/router";
+import { NativeScriptRouterModule, NSEmptyOutletComponent } from "@nativescript/angular/router";
import { FirstComponent } from "./first/first.component"
import { SecondComponent } from "./second/second.component"
diff --git a/e2e/router/app/app.module.ts b/e2e/router/app/app.module.ts
index 30b4f6cdf..84fdb0cb5 100644
--- a/e2e/router/app/app.module.ts
+++ b/e2e/router/app/app.module.ts
@@ -1,6 +1,6 @@
import { NgModule, NgModuleFactoryLoader, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
-import { NSModuleFactoryLoader } from "nativescript-angular/router";
+import { NativeScriptModule } from "@nativescript/angular";
+import { NSModuleFactoryLoader } from "@nativescript/angular/router";
import {
AppRoutingModule,
@@ -9,8 +9,8 @@ import {
import { AppComponent } from "./app.component";
-import { rendererTraceCategory, viewUtilCategory, routeReuseStrategyTraceCategory, routerTraceCategory } from "nativescript-angular/trace";
-import { setCategories, enable } from "tns-core-modules/trace";
+import { rendererTraceCategory, viewUtilCategory, routeReuseStrategyTraceCategory, routerTraceCategory } from "@nativescript/angular/trace";
+import { setCategories, enable } from "@nativescript/core/trace";
setCategories(routerTraceCategory + "," + routeReuseStrategyTraceCategory);
enable();
diff --git a/e2e/router/app/first/first.component.ts b/e2e/router/app/first/first.component.ts
index f76f54f91..7f08876f1 100644
--- a/e2e/router/app/first/first.component.ts
+++ b/e2e/router/app/first/first.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit, OnDestroy, OnChanges, DoCheck } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
-import { Page } from "tns-core-modules/ui/page";
+import { RouterExtensions } from "@nativescript/angular/router";
+import { Page } from "@nativescript/core/ui/page";
import { CounterService } from "../counter.service";
diff --git a/e2e/router/app/lazy-named/lazy-named.module.ts b/e2e/router/app/lazy-named/lazy-named.module.ts
index 22cc87913..1b1ae58fe 100644
--- a/e2e/router/app/lazy-named/lazy-named.module.ts
+++ b/e2e/router/app/lazy-named/lazy-named.module.ts
@@ -1,8 +1,8 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { Route } from "@angular/router";
-import { NativeScriptCommonModule } from "nativescript-angular/common";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { NestedMasterComponent } from "./nested-master.component"
import { NestedDetailComponent } from "./nested-detail.component"
diff --git a/e2e/router/app/lazy-named/nested-detail.component.ts b/e2e/router/app/lazy-named/nested-detail.component.ts
index 07001a901..6fc551922 100644
--- a/e2e/router/app/lazy-named/nested-detail.component.ts
+++ b/e2e/router/app/lazy-named/nested-detail.component.ts
@@ -3,8 +3,8 @@ import { ActivatedRoute, Router, Route } from "@angular/router";
import { Location } from "@angular/common";
import { Observable } from "rxjs";
import { map } from "rxjs/operators";
-import { Page } from "tns-core-modules/ui/page";
-import { RouterExtensions } from "nativescript-angular/router";
+import { Page } from "@nativescript/core/ui/page";
+import { RouterExtensions } from "@nativescript/angular/router";
@Component({
selector: "detail",
diff --git a/e2e/router/app/lazy-named/nested-master.component.ts b/e2e/router/app/lazy-named/nested-master.component.ts
index 2d68866f5..e7582697a 100644
--- a/e2e/router/app/lazy-named/nested-master.component.ts
+++ b/e2e/router/app/lazy-named/nested-master.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit, OnDestroy } from "@angular/core";
-import { Page } from "tns-core-modules/ui/page";
+import { Page } from "@nativescript/core/ui/page";
@Component({
selector: "master",
template: `
diff --git a/e2e/router/app/lazy/lazy-componentless-route.component.ts b/e2e/router/app/lazy/lazy-componentless-route.component.ts
index 0bd830aab..55efd5a1e 100644
--- a/e2e/router/app/lazy/lazy-componentless-route.component.ts
+++ b/e2e/router/app/lazy/lazy-componentless-route.component.ts
@@ -1,9 +1,9 @@
import { Component, OnInit, OnDestroy, OnChanges } from "@angular/core";
import { ActivatedRoute, Router, Route } from "@angular/router";
import { Location } from "@angular/common";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
-import { Page } from "tns-core-modules/ui/page";
+import { Page } from "@nativescript/core/ui/page";
@Component({
selector: "lazy",
diff --git a/e2e/router/app/lazy/lazy.component.ts b/e2e/router/app/lazy/lazy.component.ts
index 1a92fbe09..2e57afa63 100644
--- a/e2e/router/app/lazy/lazy.component.ts
+++ b/e2e/router/app/lazy/lazy.component.ts
@@ -1,9 +1,9 @@
import { Component, OnInit, OnDestroy, OnChanges } from "@angular/core";
import { ActivatedRoute, Router, Route } from "@angular/router";
import { Location } from "@angular/common";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
-import { Page } from "tns-core-modules/ui/page";
+import { Page } from "@nativescript/core/ui/page";
@Component({
selector: "lazy",
diff --git a/e2e/router/app/lazy/lazy.module.ts b/e2e/router/app/lazy/lazy.module.ts
index 311bdbfe4..5435d36ae 100644
--- a/e2e/router/app/lazy/lazy.module.ts
+++ b/e2e/router/app/lazy/lazy.module.ts
@@ -1,8 +1,8 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { Route } from "@angular/router";
-import { NativeScriptCommonModule } from "nativescript-angular/common";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { LazyComponent } from "./lazy.component";
import { LazyComponentlessRouteComponent } from "./lazy-componentless-route.component";
diff --git a/e2e/router/app/main.aot.ts b/e2e/router/app/main.aot.ts
index 98bf134fc..015f6e008 100644
--- a/e2e/router/app/main.aot.ts
+++ b/e2e/router/app/main.aot.ts
@@ -1,4 +1,4 @@
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
import { AppModuleNgFactory } from "./app.module.ngfactory";
platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory);
diff --git a/e2e/router/app/main.ts b/e2e/router/app/main.ts
index 639bfd513..1b1b3c521 100644
--- a/e2e/router/app/main.ts
+++ b/e2e/router/app/main.ts
@@ -1,4 +1,4 @@
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
import { AppModule } from "./app.module";
platformNativeScriptDynamic().bootstrapModule(AppModule);
diff --git a/e2e/router/app/second/detail.component.ts b/e2e/router/app/second/detail.component.ts
index ffe2e67ba..4b40290da 100644
--- a/e2e/router/app/second/detail.component.ts
+++ b/e2e/router/app/second/detail.component.ts
@@ -1,6 +1,6 @@
import { Component} from "@angular/core";
import { ActivatedRoute } from "@angular/router";
-import { Page } from "tns-core-modules/ui/page";
+import { Page } from "@nativescript/core/ui/page";
import { Observable } from "rxjs";
import { map } from "rxjs/operators";
diff --git a/e2e/router/app/second/master.component.ts b/e2e/router/app/second/master.component.ts
index fb3169180..f4821c933 100644
--- a/e2e/router/app/second/master.component.ts
+++ b/e2e/router/app/second/master.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit, OnDestroy } from "@angular/core";
-import { Page } from "tns-core-modules/ui/page";
+import { Page } from "@nativescript/core/ui/page";
@Component({
selector: "master",
template: `
diff --git a/e2e/router/app/second/second.component.ts b/e2e/router/app/second/second.component.ts
index fbdaeaee5..b9c06a949 100644
--- a/e2e/router/app/second/second.component.ts
+++ b/e2e/router/app/second/second.component.ts
@@ -1,8 +1,8 @@
import { Component, OnInit, OnDestroy } from "@angular/core";
import { ActivatedRoute } from "@angular/router";
-import { RouterExtensions } from "nativescript-angular/router";
-import { Page } from "tns-core-modules/ui/page";
+import { RouterExtensions } from "@nativescript/angular/router";
+import { Page } from "@nativescript/core/ui/page";
import { Observable } from "rxjs";
import { map } from "rxjs/operators";
import { CounterService } from "../counter.service";
diff --git a/e2e/router/package.json b/e2e/router/package.json
index e4e5126aa..173f6a68d 100644
--- a/e2e/router/package.json
+++ b/e2e/router/package.json
@@ -7,24 +7,24 @@
"id": "org.nativescript.router"
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-intl": "^3.0.0",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular/compiler-cli": "~8.2.0",
- "@ngtools/webpack": "~8.2.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@ngtools/webpack": "~9.1.0",
"@types/chai": "~4.1.7",
"@types/mocha": "~5.2.5",
"@types/node": "^10.12.12",
@@ -39,7 +39,7 @@
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
"tslib": "^1.7.1",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.3"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
diff --git a/e2e/router/tsconfig.esm.json b/e2e/router/tsconfig.esm.json
index 95f2ecee0..a96f6bbc6 100644
--- a/e2e/router/tsconfig.esm.json
+++ b/e2e/router/tsconfig.esm.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
- "module": "es2015",
+ "module": "ESNext",
"moduleResolution": "node"
}
}
diff --git a/e2e/router/tsconfig.json b/e2e/router/tsconfig.json
index eee1eca47..a3ba8b51a 100644
--- a/e2e/router/tsconfig.json
+++ b/e2e/router/tsconfig.json
@@ -6,20 +6,19 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"baseUrl": ".",
"paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
"~/*": [
"app/*"
+ ],
+ "*": [
+ "./node_modules/*"
]
}
},
diff --git a/e2e/router/tsconfig.tns.json b/e2e/router/tsconfig.tns.json
index 95f2ecee0..a96f6bbc6 100644
--- a/e2e/router/tsconfig.tns.json
+++ b/e2e/router/tsconfig.tns.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
- "module": "es2015",
+ "module": "ESNext",
"moduleResolution": "node"
}
}
diff --git a/e2e/single-page/app/app-routing.module.ts b/e2e/single-page/app/app-routing.module.ts
index 2b650ee77..a1528f7ff 100644
--- a/e2e/single-page/app/app-routing.module.ts
+++ b/e2e/single-page/app/app-routing.module.ts
@@ -1,5 +1,5 @@
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { FirstComponent } from "./first/first.component"
import { SecondComponent } from "./second/second.component"
diff --git a/e2e/single-page/app/app.module.ts b/e2e/single-page/app/app.module.ts
index 4a13ad7fe..cadf831d8 100644
--- a/e2e/single-page/app/app.module.ts
+++ b/e2e/single-page/app/app.module.ts
@@ -1,7 +1,7 @@
import { NgModule, NgModuleFactoryLoader, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
-import { NSModuleFactoryLoader } from "nativescript-angular/router";
- import { isNavigationButton } from "nativescript-angular/directives/action-bar";
+import { NativeScriptModule } from "@nativescript/angular";
+import { NSModuleFactoryLoader } from "@nativescript/angular/router";
+ import { isNavigationButton } from "@nativescript/angular/directives/action-bar";
import {
AppRoutingModule,
@@ -10,8 +10,8 @@ import {
import { AppComponent } from "./app.component";
-import { routeReuseStrategyTraceCategory, routerTraceCategory } from "nativescript-angular/trace";
-import { setCategories, enable } from "tns-core-modules/trace";
+import { routeReuseStrategyTraceCategory, routerTraceCategory } from "@nativescript/angular/trace";
+import { setCategories, enable } from "@nativescript/core/trace";
import { ModalComponent } from "./second/modal/modal.component";
setCategories(routerTraceCategory + "," + routeReuseStrategyTraceCategory);
enable();
diff --git a/e2e/single-page/app/first/first.component.ts b/e2e/single-page/app/first/first.component.ts
index aaef09a8d..e2d49e3a9 100644
--- a/e2e/single-page/app/first/first.component.ts
+++ b/e2e/single-page/app/first/first.component.ts
@@ -1,6 +1,6 @@
import { Component, OnInit, OnDestroy } from "@angular/core";
-import { Page } from "tns-core-modules/ui/page";
+import { Page } from "@nativescript/core/ui/page";
@Component({
selector: "first",
diff --git a/e2e/single-page/app/main.aot.ts b/e2e/single-page/app/main.aot.ts
index 10352ce3c..d0302e23e 100644
--- a/e2e/single-page/app/main.aot.ts
+++ b/e2e/single-page/app/main.aot.ts
@@ -1,4 +1,4 @@
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
import { AppModuleNgFactory } from "./app.module.ngfactory";
platformNativeScript({ createFrameOnBootstrap: true }).bootstrapModuleFactory(AppModuleNgFactory);
diff --git a/e2e/single-page/app/main.ts b/e2e/single-page/app/main.ts
index 864356357..52e4bc5a2 100644
--- a/e2e/single-page/app/main.ts
+++ b/e2e/single-page/app/main.ts
@@ -1,4 +1,4 @@
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
import { AppModule } from "./app.module";
platformNativeScriptDynamic({ createFrameOnBootstrap: true }).bootstrapModule(AppModule);
diff --git a/e2e/single-page/app/second/modal/modal.component.ts b/e2e/single-page/app/second/modal/modal.component.ts
index 6a954147a..895f47679 100644
--- a/e2e/single-page/app/second/modal/modal.component.ts
+++ b/e2e/single-page/app/second/modal/modal.component.ts
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
-import { ModalDialogParams } from "nativescript-angular/modal-dialog";
+import { ModalDialogParams } from "@nativescript/angular/modal-dialog";
@Component({
moduleId: module.id,
diff --git a/e2e/single-page/app/second/second.component.ts b/e2e/single-page/app/second/second.component.ts
index f06bb1299..e36fb3aec 100644
--- a/e2e/single-page/app/second/second.component.ts
+++ b/e2e/single-page/app/second/second.component.ts
@@ -1,11 +1,11 @@
import { Component, OnInit, OnDestroy, ViewContainerRef } from "@angular/core";
import { ActivatedRoute, Router, Route } from "@angular/router";
-import { ModalDialogService, ModalDialogOptions } from "nativescript-angular";
-import { Page } from "tns-core-modules/ui/page";
+import { ModalDialogService, ModalDialogOptions } from "@nativescript/angular";
+import { Page } from "@nativescript/core/ui/page";
import { Observable } from "rxjs";
import { map } from "rxjs/operators";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { ModalComponent } from "./modal/modal.component";
@Component({
diff --git a/e2e/single-page/package.json b/e2e/single-page/package.json
index a1de11d9a..493cac330 100644
--- a/e2e/single-page/package.json
+++ b/e2e/single-page/package.json
@@ -7,24 +7,24 @@
"id": "org.nativescript.singlepage"
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-intl": "^3.0.0",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular/compiler-cli": "~8.2.0",
- "@ngtools/webpack": "~8.2.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@ngtools/webpack": "~9.1.0",
"@types/chai": "~4.1.7",
"@types/mocha": "~5.2.5",
"@types/node": "~10.12.18",
@@ -39,7 +39,7 @@
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
"tslib": "^1.7.1",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.3"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
diff --git a/e2e/single-page/tsconfig.json b/e2e/single-page/tsconfig.json
index eee1eca47..a3ba8b51a 100644
--- a/e2e/single-page/tsconfig.json
+++ b/e2e/single-page/tsconfig.json
@@ -6,20 +6,19 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"baseUrl": ".",
"paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
"~/*": [
"app/*"
+ ],
+ "*": [
+ "./node_modules/*"
]
}
},
diff --git a/e2e/tests-app-ng/app/app.module.ts b/e2e/tests-app-ng/app/app.module.ts
index 1ac14641e..dc66e43ed 100644
--- a/e2e/tests-app-ng/app/app.module.ts
+++ b/e2e/tests-app-ng/app/app.module.ts
@@ -1,10 +1,10 @@
import { NgModule, NgModuleFactoryLoader, NO_ERRORS_SCHEMA } from "@angular/core";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
+import { NativeScriptModule } from "@nativescript/angular";
import { NavigationMainPageRouterComponent } from "./main/main-page-router-outlet";
import { routableComponents, routes } from "./app.routes";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
-import { NativeScriptFormsModule } from "nativescript-angular/forms";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
+import { NativeScriptFormsModule } from "@nativescript/angular/forms";
import { NestedComponent } from "./action-bar/action-bar-nested.component";
import { CustomTemplateComponent } from "./list-view/list-view-item-template.component";
diff --git a/e2e/tests-app-ng/app/lazy/lazy.component.ts b/e2e/tests-app-ng/app/lazy/lazy.component.ts
index 00d30bbb1..6bba0b05e 100644
--- a/e2e/tests-app-ng/app/lazy/lazy.component.ts
+++ b/e2e/tests-app-ng/app/lazy/lazy.component.ts
@@ -1,7 +1,7 @@
import { Component } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
-import { ModalDialogParams } from "nativescript-angular/directives/dialogs";
+import { RouterExtensions } from "@nativescript/angular/router";
+import { ModalDialogParams } from "@nativescript/angular/directives/dialogs";
@Component({
selector: "ns-lazy",
diff --git a/e2e/tests-app-ng/app/lazy/lazy.module.ts b/e2e/tests-app-ng/app/lazy/lazy.module.ts
index b48ea497f..46bff152f 100644
--- a/e2e/tests-app-ng/app/lazy/lazy.module.ts
+++ b/e2e/tests-app-ng/app/lazy/lazy.module.ts
@@ -1,6 +1,6 @@
-import { NativeScriptCommonModule } from "nativescript-angular/common";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
-import { ModalDialogParams } from "nativescript-angular/directives/dialogs";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
+import { ModalDialogParams } from "@nativescript/angular/directives/dialogs";
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { Routes } from "@angular/router";
diff --git a/e2e/tests-app-ng/app/main.aot.ts b/e2e/tests-app-ng/app/main.aot.ts
index 9a731884a..7fe4ee42f 100644
--- a/e2e/tests-app-ng/app/main.aot.ts
+++ b/e2e/tests-app-ng/app/main.aot.ts
@@ -1,4 +1,4 @@
-import { platformNativeScript } from "nativescript-angular/platform-static";
+import { platformNativeScript } from "@nativescript/angular/platform-static";
import { AppModuleNgFactory } from "./app.module.ngfactory";
diff --git a/e2e/tests-app-ng/app/main.ts b/e2e/tests-app-ng/app/main.ts
index 985fa3445..9d0112e98 100644
--- a/e2e/tests-app-ng/app/main.ts
+++ b/e2e/tests-app-ng/app/main.ts
@@ -1,4 +1,4 @@
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
import { AppModule } from "./app.module";
diff --git a/e2e/tests-app-ng/app/main/main-page-router-outlet.ts b/e2e/tests-app-ng/app/main/main-page-router-outlet.ts
index 727262b01..1a37b2f5d 100644
--- a/e2e/tests-app-ng/app/main/main-page-router-outlet.ts
+++ b/e2e/tests-app-ng/app/main/main-page-router-outlet.ts
@@ -1,5 +1,5 @@
import { Component } from "@angular/core";
-import * as platform from "tns-core-modules/platform";
+import * as platform from "@nativescript/core/platform";
@Component({
selector: "main",
diff --git a/e2e/tests-app-ng/app/modal/lazy/lazy-load-modal.component.ts b/e2e/tests-app-ng/app/modal/lazy/lazy-load-modal.component.ts
index 0e55c4653..3e36efd68 100644
--- a/e2e/tests-app-ng/app/modal/lazy/lazy-load-modal.component.ts
+++ b/e2e/tests-app-ng/app/modal/lazy/lazy-load-modal.component.ts
@@ -6,8 +6,8 @@ import {
ViewContainerRef,
} from "@angular/core";
-import { NSModuleFactoryLoader } from "nativescript-angular/router";
-import { ModalDialogService } from "nativescript-angular/directives/dialogs";
+import { NSModuleFactoryLoader } from "@nativescript/angular/router";
+import { ModalDialogService } from "@nativescript/angular/directives/dialogs";
import { LazyComponent } from "../../lazy/lazy.component";
diff --git a/e2e/tests-app-ng/app/modal/modal-dialogs/modal-dialog.component.ts b/e2e/tests-app-ng/app/modal/modal-dialogs/modal-dialog.component.ts
index 655f5241c..a83fe6864 100644
--- a/e2e/tests-app-ng/app/modal/modal-dialogs/modal-dialog.component.ts
+++ b/e2e/tests-app-ng/app/modal/modal-dialogs/modal-dialog.component.ts
@@ -8,7 +8,7 @@ import {
ModalDialogService,
ModalDialogOptions,
ModalDialogParams
-} from "nativescript-angular/directives/dialogs";
+} from "@nativescript/angular/directives/dialogs";
@Component({
selector: "modal-content",
diff --git a/e2e/tests-app-ng/app/navigation-options/navigation-info.component.ts b/e2e/tests-app-ng/app/navigation-options/navigation-info.component.ts
index 1815b701b..c949dac24 100644
--- a/e2e/tests-app-ng/app/navigation-options/navigation-info.component.ts
+++ b/e2e/tests-app-ng/app/navigation-options/navigation-info.component.ts
@@ -1,6 +1,6 @@
import { Component } from "@angular/core";
-import { NSLocationStrategy } from "nativescript-angular/router/ns-location-strategy";
-import { Frame } from "tns-core-modules/ui/frame";
+import { NSLocationStrategy } from "@nativescript/angular";
+import { Frame } from "@nativescript/core/ui/frame";
@Component({
selector: "nav-info",
diff --git a/e2e/tests-app-ng/app/navigation-options/navigation-options.component.ts b/e2e/tests-app-ng/app/navigation-options/navigation-options.component.ts
index fd23438fe..869173661 100644
--- a/e2e/tests-app-ng/app/navigation-options/navigation-options.component.ts
+++ b/e2e/tests-app-ng/app/navigation-options/navigation-options.component.ts
@@ -1,5 +1,5 @@
import { Component } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
@Component({
selector: "nav-options",
diff --git a/e2e/tests-app-ng/app/segmented-bar/issue-649.component.ts b/e2e/tests-app-ng/app/segmented-bar/issue-649.component.ts
index e74b30098..2c2bd85e4 100644
--- a/e2e/tests-app-ng/app/segmented-bar/issue-649.component.ts
+++ b/e2e/tests-app-ng/app/segmented-bar/issue-649.component.ts
@@ -1,5 +1,5 @@
import { Component } from "@angular/core";
-import { SegmentedBar, SegmentedBarItem } from "tns-core-modules/ui/segmented-bar";
+import { SegmentedBar, SegmentedBarItem } from "@nativescript/core/ui/segmented-bar";
@Component({
styles: ["#second { margin: 5; color: blue;" +
diff --git a/e2e/tests-app-ng/package.json b/e2e/tests-app-ng/package.json
index 97e4fcf8b..45797ca4a 100644
--- a/e2e/tests-app-ng/package.json
+++ b/e2e/tests-app-ng/package.json
@@ -13,25 +13,25 @@
}
},
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "nativescript-angular": "file:../../nativescript-angular-package",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "@nativescript/angular": "file:../../dist/nativescript-angular-scoped.tgz",
"nativescript-intl": "~3.0.0",
"nativescript-theme-core": "^1.0.4",
"reflect-metadata": "~0.1.8",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular/compiler-cli": "~8.2.0",
- "@ngtools/webpack": "~8.2.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@ngtools/webpack": "~9.1.0",
"babel-traverse": "6.24.1",
"babel-types": "6.24.1",
"babylon": "6.17.0",
@@ -40,7 +40,7 @@
"lazy": "1.0.11",
"nativescript-dev-webpack": "next",
"tslint": "^5.4.3",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.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 eee1eca47..a3ba8b51a 100644
--- a/e2e/tests-app-ng/tsconfig.json
+++ b/e2e/tests-app-ng/tsconfig.json
@@ -6,20 +6,19 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"baseUrl": ".",
"paths": {
- "*": [
- "./node_modules/tns-core-modules/*",
- "./node_modules/*",
- "./node_modules/nativescript-angular/node_modules/*"
- ],
"~/*": [
"app/*"
+ ],
+ "*": [
+ "./node_modules/*"
]
}
},
diff --git a/e2e/tests-app-ng/tsconfig.tns.json b/e2e/tests-app-ng/tsconfig.tns.json
index 95f2ecee0..a96f6bbc6 100644
--- a/e2e/tests-app-ng/tsconfig.tns.json
+++ b/e2e/tests-app-ng/tsconfig.tns.json
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
- "module": "es2015",
+ "module": "ESNext",
"moduleResolution": "node"
}
}
diff --git a/nativescript-angular-package/package.json b/nativescript-angular-package/package.json
index 9c0ce6a1d..210549b7a 100644
--- a/nativescript-angular-package/package.json
+++ b/nativescript-angular-package/package.json
@@ -1,6 +1,6 @@
{
"name": "nativescript-angular",
- "version": "8.21.0",
+ "version": "9.0.0",
"description": "An Angular renderer that lets you build mobile apps with NativeScript.",
"homepage": "https://www.nativescript.org/",
"bugs": "https://github.com/NativeScript/nativescript-angular/issues",
@@ -26,18 +26,18 @@
"@nativescript/angular": "file:../nativescript-angular"
},
"devDependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/compiler-cli": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "typescript": "~3.5.3"
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "typescript": "~3.8.3"
},
"scripts": {
"ngc": "ngc -p tsconfig.json",
diff --git a/nativescript-angular-package/tsconfig.json b/nativescript-angular-package/tsconfig.json
index b128b871a..96c60bde6 100644
--- a/nativescript-angular-package/tsconfig.json
+++ b/nativescript-angular-package/tsconfig.json
@@ -11,11 +11,12 @@
"declaration": true,
"removeComments": false,
"noEmitOnError": true,
+ "skipLibCheck": true,
"noImplicitAny": false,
"lib": [
- "dom",
- "es6",
- "es2015.iterable"
+ "es2017",
+ "dom",
+ "es6"
],
"baseUrl": "."
},
diff --git a/nativescript-angular/.npmignore b/nativescript-angular/.npmignore
index 3eb3853e2..9e43d16dc 100644
--- a/nativescript-angular/.npmignore
+++ b/nativescript-angular/.npmignore
@@ -3,8 +3,6 @@
*.ts
!*.d.ts
-*.js.map
-
tsconfig.json
global.d.ts
.npmignore
diff --git a/nativescript-angular/animations/animation-driver.ts b/nativescript-angular/animations/animation-driver.ts
index 5e1b3af6c..897763e34 100644
--- a/nativescript-angular/animations/animation-driver.ts
+++ b/nativescript-angular/animations/animation-driver.ts
@@ -1,9 +1,9 @@
import { AnimationPlayer } from "@angular/animations";
import { AnimationDriver } from "@angular/animations/browser";
-import { createSelector, SelectorCore } from "tns-core-modules/ui/styling/css-selector";
-import { CssAnimationProperty } from "tns-core-modules/ui/core/properties";
-import { eachDescendant } from "tns-core-modules/ui/core/view";
-import { ProxyViewContainer } from "tns-core-modules/ui/proxy-view-container";
+import { createSelector, SelectorCore } from "@nativescript/core/ui/styling/css-selector";
+import { CssAnimationProperty } from "@nativescript/core/ui/core/properties";
+import { eachDescendant } from "@nativescript/core/ui/core/view";
+import { ProxyViewContainer } from "@nativescript/core/ui/proxy-view-container";
import { NativeScriptAnimationPlayer } from "./animation-player";
import {
diff --git a/nativescript-angular/animations/animation-player.ts b/nativescript-angular/animations/animation-player.ts
index d63ef066e..831fa4517 100644
--- a/nativescript-angular/animations/animation-player.ts
+++ b/nativescript-angular/animations/animation-player.ts
@@ -1,7 +1,7 @@
import { AnimationPlayer } from "@angular/animations";
import { KeyframeAnimation }
- from "tns-core-modules/ui/animation/keyframe-animation";
-import { View, EventData } from "tns-core-modules/ui/core/view";
+ from "@nativescript/core/ui/animation/keyframe-animation";
+import { View, EventData } from "@nativescript/core/ui/core/view";
import { Keyframe, createKeyframeAnimation } from "./utils";
import { NgView } from "../element-registry";
diff --git a/nativescript-angular/animations/animations.module.ts b/nativescript-angular/animations/animations.module.ts
index 8e000fb04..304a45f0d 100644
--- a/nativescript-angular/animations/animations.module.ts
+++ b/nativescript-angular/animations/animations.module.ts
@@ -1,26 +1,25 @@
import {
- NgModule,
- Injectable,
- Inject,
- NgZone,
- Provider,
- RendererFactory2,
- Optional,
- SkipSelf,
+ NgModule,
+ Injectable,
+ Inject,
+ NgZone,
+ RendererFactory2,
+ Optional,
+ SkipSelf,
} from "@angular/core";
import { DOCUMENT } from "@angular/common";
import { AnimationBuilder } from "@angular/animations";
import {
- AnimationDriver,
- ɵAnimationStyleNormalizer as AnimationStyleNormalizer,
- ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer,
- ɵAnimationEngine as AnimationEngine,
+ AnimationDriver,
+ ɵAnimationStyleNormalizer as AnimationStyleNormalizer,
+ ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer,
+ ɵAnimationEngine as AnimationEngine,
} from "@angular/animations/browser";
import {
- ɵAnimationRendererFactory as AnimationRendererFactory,
- ɵBrowserAnimationBuilder as BrowserAnimationBuilder,
+ ɵAnimationRendererFactory as AnimationRendererFactory,
+ ɵBrowserAnimationBuilder as BrowserAnimationBuilder,
} from "@angular/platform-browser/animations";
import { NativeScriptModule } from "../nativescript.module";
@@ -30,43 +29,56 @@ import { throwIfAlreadyLoaded } from "../common/utils";
@Injectable()
export class InjectableAnimationEngine extends AnimationEngine {
- constructor(@Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {
- super(doc.body, driver, normalizer);
- }
+ constructor(
+ @Inject(DOCUMENT) doc: any,
+ driver: AnimationDriver,
+ normalizer: AnimationStyleNormalizer
+ ) {
+ super(doc.body, driver, normalizer);
+ }
}
export function instantiateSupportedAnimationDriver() {
- return new NativeScriptAnimationDriver();
+ return new NativeScriptAnimationDriver();
}
export function instantiateRendererFactory(
- renderer: NativeScriptRendererFactory, engine: AnimationEngine, zone: NgZone) {
- return new AnimationRendererFactory(renderer, engine, zone);
+ renderer: NativeScriptRendererFactory,
+ engine: AnimationEngine,
+ zone: NgZone
+) {
+ return new AnimationRendererFactory(renderer, engine, zone);
}
export function instantiateDefaultStyleNormalizer() {
- return new WebAnimationsStyleNormalizer();
+ return new WebAnimationsStyleNormalizer();
}
-export const NATIVESCRIPT_ANIMATIONS_PROVIDERS: Provider[] = [
- {provide: AnimationDriver, useFactory: instantiateSupportedAnimationDriver},
- {provide: AnimationBuilder, useClass: BrowserAnimationBuilder},
- {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},
- {provide: AnimationEngine, useClass: InjectableAnimationEngine},
- {
- provide: RendererFactory2,
- useFactory: instantiateRendererFactory,
- deps: [NativeScriptRendererFactory, AnimationEngine, NgZone]
- }
-];
-
@NgModule({
- imports: [NativeScriptModule],
- providers: NATIVESCRIPT_ANIMATIONS_PROVIDERS,
+ imports: [NativeScriptModule],
+ providers: [
+ {
+ provide: AnimationDriver,
+ useFactory: instantiateSupportedAnimationDriver,
+ },
+ { provide: AnimationBuilder, useClass: BrowserAnimationBuilder },
+ {
+ provide: AnimationStyleNormalizer,
+ useFactory: instantiateDefaultStyleNormalizer,
+ },
+ { provide: AnimationEngine, useClass: InjectableAnimationEngine },
+ {
+ provide: RendererFactory2,
+ useFactory: instantiateRendererFactory,
+ deps: [NativeScriptRendererFactory, AnimationEngine, NgZone],
+ },
+ ],
})
export class NativeScriptAnimationsModule {
- constructor(@Optional() @SkipSelf() parentModule: NativeScriptAnimationsModule) {
- // Prevents NativeScriptAnimationsModule from getting imported multiple times
- throwIfAlreadyLoaded(parentModule, "NativeScriptAnimationsModule");
- }
+ constructor(
+ @Optional() @SkipSelf() parentModule: NativeScriptAnimationsModule
+ ) {
+ // Prevents NativeScriptAnimationsModule from getting imported multiple times
+ throwIfAlreadyLoaded(parentModule, "NativeScriptAnimationsModule");
+ }
}
diff --git a/nativescript-angular/animations/utils.ts b/nativescript-angular/animations/utils.ts
index 60b0a1045..c00593283 100644
--- a/nativescript-angular/animations/utils.ts
+++ b/nativescript-angular/animations/utils.ts
@@ -3,9 +3,9 @@ import {
KeyframeAnimationInfo,
KeyframeDeclaration,
KeyframeInfo,
-} from "tns-core-modules/ui/animation/keyframe-animation";
-import { parseKeyframeDeclarations } from "tns-core-modules/ui/styling/css-animation-parser";
-import { animationTimingFunctionConverter } from "tns-core-modules/ui/styling/converters";
+} from "@nativescript/core/ui/animation/keyframe-animation";
+import { parseKeyframeDeclarations } from "@nativescript/core/ui/styling/css-animation-parser";
+import { animationTimingFunctionConverter } from "@nativescript/core/ui/styling/converters";
export interface Keyframe {
[key: string]: string | number;
diff --git a/nativescript-angular/app-host-view.ts b/nativescript-angular/app-host-view.ts
index 60c0fca72..41ffe8e8b 100644
--- a/nativescript-angular/app-host-view.ts
+++ b/nativescript-angular/app-host-view.ts
@@ -1,7 +1,7 @@
-import { ContentView } from "tns-core-modules/ui/content-view";
-import { GridLayout } from "tns-core-modules/ui/layouts/grid-layout";
-import { ProxyViewContainer } from "tns-core-modules/ui/proxy-view-container";
-import { View } from "tns-core-modules/ui/core/view";
+import { ContentView } from "@nativescript/core/ui/content-view";
+import { GridLayout } from "@nativescript/core/ui/layouts/grid-layout";
+import { ProxyViewContainer } from "@nativescript/core/ui/proxy-view-container";
+import { View } from "@nativescript/core/ui/core/view";
export class AppHostView extends ContentView {
@@ -21,6 +21,11 @@ export class AppHostView extends ContentView {
}
set content(value: View) {
+ // TODO: WIP, determine how to handle this
+ if (this._content) {
+ return;
+ }
+
if (this._content) {
this._content.parentNode = undefined;
}
diff --git a/nativescript-angular/common.ts b/nativescript-angular/common.ts
index f148d787e..19306bbe3 100644
--- a/nativescript-angular/common.ts
+++ b/nativescript-angular/common.ts
@@ -1,42 +1,61 @@
import { CommonModule } from "@angular/common";
-import {
- NO_ERRORS_SCHEMA,
- NgModule,
-} from "@angular/core";
+import { NO_ERRORS_SCHEMA, NgModule } from "@angular/core";
+import { ModalDialogService } from "./directives/dialogs";
import {
- ModalDialogHost,
- ModalDialogService,
-} from "./directives/dialogs";
+ defaultDeviceProvider,
+ defaultFrameProvider,
+ defaultPageProvider,
+} from "./platform-providers";
+import { ListViewComponent } from "./directives/list-view-comp";
+import { TemplateKeyDirective } from "./directives/templated-items-comp";
+import { TabViewDirective, TabViewItemDirective } from "./directives/tab-view";
import {
+ ActionBarComponent,
+ ActionBarScope,
+ ActionItemDirective,
+ NavigationButtonDirective,
+} from "./directives/action-bar";
+import {
+ AndroidFilterComponent,
+ IosFilterComponent,
+} from "./directives/platform-filters";
+
+@NgModule({
+ declarations: [
+ ListViewComponent,
+ TemplateKeyDirective,
+ TabViewDirective,
+ TabViewItemDirective,
+ ActionBarComponent,
+ ActionBarScope,
+ ActionItemDirective,
+ NavigationButtonDirective,
+ AndroidFilterComponent,
+ IosFilterComponent,
+ ],
+ providers: [
+ ModalDialogService,
defaultDeviceProvider,
defaultFrameProvider,
defaultPageProvider,
-} from "./platform-providers";
-import { NS_DIRECTIVES } from "./directives";
-
-@NgModule({
- declarations: [
- ModalDialogHost,
- ...NS_DIRECTIVES,
- ],
- providers: [
- ModalDialogService,
- defaultDeviceProvider,
- defaultFrameProvider,
- defaultPageProvider,
- ],
- imports: [
- CommonModule,
- ],
- exports: [
- CommonModule,
- ModalDialogHost,
- ...NS_DIRECTIVES,
- ],
- schemas: [NO_ERRORS_SCHEMA]
+ ],
+ imports: [CommonModule],
+ exports: [
+ CommonModule,
+ ListViewComponent,
+ TemplateKeyDirective,
+ TabViewDirective,
+ TabViewItemDirective,
+ ActionBarComponent,
+ ActionBarScope,
+ ActionItemDirective,
+ NavigationButtonDirective,
+ AndroidFilterComponent,
+ IosFilterComponent,
+ ],
+ schemas: [NO_ERRORS_SCHEMA],
})
-export class NativeScriptCommonModule {
-}
+export class NativeScriptCommonModule {}
export * from "./directives";
diff --git a/nativescript-angular/common/detached-loader.ts b/nativescript-angular/common/detached-loader.ts
index cb4038584..4069b4d71 100644
--- a/nativescript-angular/common/detached-loader.ts
+++ b/nativescript-angular/common/detached-loader.ts
@@ -2,7 +2,7 @@ import {
ComponentRef, ComponentFactory, ViewContainerRef,
Component, Type, ComponentFactoryResolver, ChangeDetectorRef
} from "@angular/core";
-import { write } from "tns-core-modules/trace";
+import { write } from "@nativescript/core/trace";
export const CATEGORY = "detached-loader";
function log(message: string) {
diff --git a/nativescript-angular/directives/action-bar.ts b/nativescript-angular/directives/action-bar.ts
index 0f27eae99..eb37f818d 100644
--- a/nativescript-angular/directives/action-bar.ts
+++ b/nativescript-angular/directives/action-bar.ts
@@ -1,11 +1,11 @@
import { Directive, Component, ElementRef, Optional, OnDestroy } from "@angular/core";
import {
- ActionBar,
- ActionItem,
- ActionItems,
- NavigationButton,
-} from "tns-core-modules/ui/action-bar";
-import { Page } from "tns-core-modules/ui/page";
+ ActionBar,
+ ActionItem,
+ ActionItems,
+ NavigationButton,
+} from "@nativescript/core/ui/action-bar";
+import { Page } from "@nativescript/core/ui/page";
import { isBlank } from "../lang-facade";
import {
@@ -82,9 +82,9 @@ const appendActionItem = (bar: NgActionBar, item: ActionItem) => {
bar.actionItems.addItem(item);
};
-registerElement("ActionBar", () => require("tns-core-modules/ui/action-bar").ActionBar, actionBarMeta);
-registerElement("ActionItem", () => require("tns-core-modules/ui/action-bar").ActionItem);
-registerElement("NavigationButton", () => require("tns-core-modules/ui/action-bar").NavigationButton);
+registerElement("ActionBar", () => ActionBar, actionBarMeta);
+registerElement("ActionItem", () => ActionItem);
+registerElement("NavigationButton", () => NavigationButton);
@Component({
selector: "ActionBar",
diff --git a/nativescript-angular/directives/dialogs.ts b/nativescript-angular/directives/dialogs.ts
index 14463c533..a7b8e1d62 100644
--- a/nativescript-angular/directives/dialogs.ts
+++ b/nativescript-angular/directives/dialogs.ts
@@ -1,7 +1,6 @@
import {
ComponentFactoryResolver,
ComponentRef,
- Directive,
Injectable,
Injector,
NgModuleRef,
@@ -10,15 +9,15 @@ import {
} from "@angular/core";
import { NSLocationStrategy } from "../router/ns-location-strategy";
-import { View, ViewBase } from "tns-core-modules/ui/core/view";
-import { ProxyViewContainer } from "tns-core-modules/ui/proxy-view-container/proxy-view-container";
+import { View, ViewBase } from "@nativescript/core/ui/core/view";
+import { ProxyViewContainer } from "@nativescript/core/ui/proxy-view-container/proxy-view-container";
import { AppHostView } from "../app-host-view";
import { DetachedLoader } from "../common/detached-loader";
import { PageFactory, PAGE_FACTORY } from "../platform-providers";
import { once } from "../common/utils";
-import { Frame } from "tns-core-modules/ui/frame";
-import { ShowModalOptions } from "tns-core-modules/ui/core/view";
+import { Frame } from "@nativescript/core/ui/frame";
+import { ShowModalOptions } from "@nativescript/core/ui/core/view";
export type BaseShowModalOptions = Pick>;
@@ -132,7 +131,7 @@ export class ModalDialogService {
parent: options.containerRef.injector
});
const detachedFactory = options.resolver.resolveComponentFactory(DetachedLoader);
- detachedLoaderRef = options.containerRef.createComponent(detachedFactory, -1, childInjector, null);
+ detachedLoaderRef = options.containerRef.createComponent(detachedFactory, 0, childInjector, null);
detachedLoaderRef.instance.loadComponent(options.type).then((compRef) => {
const detachedProxy = compRef.location.nativeElement;
@@ -150,15 +149,3 @@ export class ModalDialogService {
});
}
}
-
-@Directive({
- selector: "[modal-dialog-host]" // tslint:disable-line:directive-selector
-})
-export class ModalDialogHost { // tslint:disable-line:directive-class-suffix
- constructor() {
- throw new Error("ModalDialogHost is deprecated. " +
- "Call ModalDialogService.showModal() " +
- "by passing ViewContainerRef in the options instead."
- );
- }
-}
diff --git a/nativescript-angular/directives/index.ts b/nativescript-angular/directives/index.ts
index 4fd2966f5..4b34a877e 100644
--- a/nativescript-angular/directives/index.ts
+++ b/nativescript-angular/directives/index.ts
@@ -1,5 +1,5 @@
import { ListViewComponent } from "./list-view-comp";
-import { TemplateKeyDirective, SetupItemViewArgs, TemplatedItemsComponent } from "./templated-items-comp";
+import { TemplateKeyDirective, TemplatedItemsComponent } from "./templated-items-comp";
import { TabViewDirective, TabViewItemDirective } from "./tab-view";
import {
ActionBarComponent,
@@ -8,7 +8,7 @@ import {
NavigationButtonDirective
} from "./action-bar";
import { AndroidFilterComponent, IosFilterComponent } from "./platform-filters";
-import { ModalDialogHost, ModalDialogOptions, ModalDialogParams, ModalDialogService } from "./dialogs";
+import { ModalDialogOptions, ModalDialogParams, ModalDialogService } from "./dialogs";
export const NS_DIRECTIVES = [
ListViewComponent,
@@ -26,7 +26,6 @@ export const NS_DIRECTIVES = [
export {
ListViewComponent,
TemplateKeyDirective,
- SetupItemViewArgs,
TemplatedItemsComponent,
TabViewDirective,
TabViewItemDirective,
@@ -36,7 +35,6 @@ export {
NavigationButtonDirective,
AndroidFilterComponent,
IosFilterComponent,
- ModalDialogHost,
ModalDialogOptions,
ModalDialogParams,
ModalDialogService
diff --git a/nativescript-angular/directives/list-view-comp.ts b/nativescript-angular/directives/list-view-comp.ts
index da3a19d5b..f4c1fb4e2 100644
--- a/nativescript-angular/directives/list-view-comp.ts
+++ b/nativescript-angular/directives/list-view-comp.ts
@@ -5,7 +5,7 @@ import {
IterableDiffers,
forwardRef
} from "@angular/core";
-import { ListView } from "tns-core-modules/ui/list-view";
+import { ListView } from "@nativescript/core/ui/list-view";
import { TEMPLATED_ITEMS_COMPONENT, TemplatedItemsComponent } from "./templated-items-comp";
@Component({
diff --git a/nativescript-angular/directives/platform-filters.ts b/nativescript-angular/directives/platform-filters.ts
index 22105987a..77b718b49 100644
--- a/nativescript-angular/directives/platform-filters.ts
+++ b/nativescript-angular/directives/platform-filters.ts
@@ -1,5 +1,5 @@
import { Component, Inject } from "@angular/core";
-import { Device, platformNames } from "tns-core-modules/platform";
+import { Device, platformNames } from "@nativescript/core/platform";
import { DEVICE } from "../platform-providers";
@Component({
diff --git a/nativescript-angular/directives/tab-view.ts b/nativescript-angular/directives/tab-view.ts
index 787918658..3c595a37f 100644
--- a/nativescript-angular/directives/tab-view.ts
+++ b/nativescript-angular/directives/tab-view.ts
@@ -7,8 +7,8 @@ import {
TemplateRef,
ViewContainerRef,
} from "@angular/core";
-import { TabView, TabViewItem } from "tns-core-modules/ui/tab-view";
-import { TextTransform } from "tns-core-modules/ui/text-base";
+import { TabView, TabViewItem } from "@nativescript/core/ui/tab-view";
+import { TextTransform } from "@nativescript/core/ui/text-base";
import { InvisibleNode } from "../element-registry";
import { rendererLog, isLogEnabled } from "../trace";
diff --git a/nativescript-angular/directives/templated-items-comp.ts b/nativescript-angular/directives/templated-items-comp.ts
index 69aaabfed..373ebcad5 100644
--- a/nativescript-angular/directives/templated-items-comp.ts
+++ b/nativescript-angular/directives/templated-items-comp.ts
@@ -19,11 +19,15 @@ import {
ViewContainerRef,
ɵisListLikeIterable as isListLikeIterable
} from "@angular/core";
-import { ItemEventData, TemplatedItemsView } from "tns-core-modules/ui/list-view";
-import { View, KeyedTemplate } from "tns-core-modules/ui/core/view";
-import { LayoutBase } from "tns-core-modules/ui/layouts/layout-base";
-import { ObservableArray } from "tns-core-modules/data/observable-array";
-import { profile } from "tns-core-modules/profiling";
+// TODO: refactor core module imports to allow this to work properly
+// import { View, LayoutBase, KeyedTemplate, ItemEventData, TemplatedItemsView, ObservableArray } from "@nativescript/core";
+// Ivy entry points get out of order and will cause issues like this:
+// node_modules/@nativescript/core/ui/html-view/html-view-common.js:26:0: JS ERROR TypeError: undefined is not an object (evaluating 'color_1.Color.equals') if not using deep imports like the following for the moment
+import { ItemEventData, TemplatedItemsView } from "@nativescript/core/ui/list-view";
+import { View, KeyedTemplate } from "@nativescript/core/ui/core/view";
+import { LayoutBase } from "@nativescript/core/ui/layouts/layout-base";
+import { ObservableArray } from "@nativescript/core/data/observable-array";
+import { profile } from "@nativescript/core/profiling";
import { getSingleViewRecursive } from "../element-registry";
import { listViewLog, listViewError, isLogEnabled } from "../trace";
diff --git a/nativescript-angular/dom-adapter.ts b/nativescript-angular/dom-adapter.ts
index 9d47b2fe7..582da2ffc 100644
--- a/nativescript-angular/dom-adapter.ts
+++ b/nativescript-angular/dom-adapter.ts
@@ -1,6 +1,6 @@
/* tslint:disable */
import { Type } from "@angular/core";
-import { ɵDomAdapter, ɵsetRootDomAdapter } from "@angular/platform-browser";
+import { ɵDomAdapter, ɵsetRootDomAdapter } from "@angular/common";
import { rendererLog, isLogEnabled } from "./trace";
export class NativeScriptDomAdapter implements ɵDomAdapter {
diff --git a/nativescript-angular/element-registry.ts b/nativescript-angular/element-registry.ts
index aa13353d3..a371e6b6f 100644
--- a/nativescript-angular/element-registry.ts
+++ b/nativescript-angular/element-registry.ts
@@ -1,7 +1,7 @@
-import { View } from "tns-core-modules/ui/core/view";
-import { LayoutBase } from "tns-core-modules/ui/layouts/layout-base";
-import { Page } from "tns-core-modules/ui/page";
-import { Frame } from "tns-core-modules/ui/frame";
+import { View } from "@nativescript/core/ui/core/view";
+import { LayoutBase } from "@nativescript/core/ui/layouts/layout-base";
+import { Page } from "@nativescript/core/ui/page";
+import { Frame } from "@nativescript/core/ui/frame";
export type NgView = (View & ViewExtensions);
@@ -172,51 +172,51 @@ const frameMeta: ViewClassMeta = {
// Register default NativeScript components
// Note: ActionBar related components are registerd together with action-bar directives.
-registerElement("AbsoluteLayout", () => require("tns-core-modules/ui/layouts/absolute-layout").AbsoluteLayout);
-registerElement("ActivityIndicator", () => require("tns-core-modules/ui/activity-indicator").ActivityIndicator);
-registerElement("Border", () => require("tns-core-modules/ui/border").Border);
-registerElement("BottomNavigation", () => require("tns-core-modules/ui/bottom-navigation").BottomNavigation);
-registerElement("Button", () => require("tns-core-modules/ui/button").Button);
-registerElement("ContentView", () => require("tns-core-modules/ui/content-view").ContentView);
-registerElement("DatePicker", () => require("tns-core-modules/ui/date-picker").DatePicker);
-registerElement("DockLayout", () => require("tns-core-modules/ui/layouts/dock-layout").DockLayout);
-registerElement("Frame", () => require("tns-core-modules/ui/frame").Frame, frameMeta);
-registerElement("GridLayout", () => require("tns-core-modules/ui/layouts/grid-layout").GridLayout);
-registerElement("HtmlView", () => require("tns-core-modules/ui/html-view").HtmlView);
-registerElement("Image", () => require("tns-core-modules/ui/image").Image);
+registerElement("AbsoluteLayout", () => require("@nativescript/core/ui/layouts/absolute-layout").AbsoluteLayout);
+registerElement("ActivityIndicator", () => require("@nativescript/core/ui/activity-indicator").ActivityIndicator);
+registerElement("Border", () => require("@nativescript/core/ui/border").Border);
+registerElement("BottomNavigation", () => require("@nativescript/core/ui/bottom-navigation").BottomNavigation);
+registerElement("Button", () => require("@nativescript/core/ui/button").Button);
+registerElement("ContentView", () => require("@nativescript/core/ui/content-view").ContentView);
+registerElement("DatePicker", () => require("@nativescript/core/ui/date-picker").DatePicker);
+registerElement("DockLayout", () => require("@nativescript/core/ui/layouts/dock-layout").DockLayout);
+registerElement("Frame", () => require("@nativescript/core/ui/frame").Frame, frameMeta);
+registerElement("GridLayout", () => require("@nativescript/core/ui/layouts/grid-layout").GridLayout);
+registerElement("HtmlView", () => require("@nativescript/core/ui/html-view").HtmlView);
+registerElement("Image", () => require("@nativescript/core/ui/image").Image);
// Parse5 changes tags to
. WTF!
-registerElement("img", () => require("tns-core-modules/ui/image").Image);
-registerElement("Label", () => require("tns-core-modules/ui/label").Label);
-registerElement("ListPicker", () => require("tns-core-modules/ui/list-picker").ListPicker);
-registerElement("ListView", () => require("tns-core-modules/ui/list-view").ListView);
-registerElement("Page", () => require("tns-core-modules/ui/page").Page);
-registerElement("Placeholder", () => require("tns-core-modules/ui/placeholder").Placeholder);
-registerElement("Progress", () => require("tns-core-modules/ui/progress").Progress);
-registerElement("ProxyViewContainer", () => require("tns-core-modules/ui/proxy-view-container").ProxyViewContainer);
-registerElement("Repeater", () => require("tns-core-modules/ui/repeater").Repeater);
-registerElement("ScrollView", () => require("tns-core-modules/ui/scroll-view").ScrollView);
-registerElement("SearchBar", () => require("tns-core-modules/ui/search-bar").SearchBar);
-registerElement("SegmentedBar", () => require("tns-core-modules/ui/segmented-bar").SegmentedBar);
-registerElement("SegmentedBarItem", () => require("tns-core-modules/ui/segmented-bar").SegmentedBarItem);
-registerElement("Slider", () => require("tns-core-modules/ui/slider").Slider);
-registerElement("StackLayout", () => require("tns-core-modules/ui/layouts/stack-layout").StackLayout);
-registerElement("FlexboxLayout", () => require("tns-core-modules/ui/layouts/flexbox-layout").FlexboxLayout);
-registerElement("Switch", () => require("tns-core-modules/ui/switch").Switch);
-registerElement("TabView", () => require("tns-core-modules/ui/tab-view").TabView);
-registerElement("TabStrip", () => require("tns-core-modules/ui/tab-navigation-base/tab-strip").TabStrip);
-registerElement("TabStripItem", () => require("tns-core-modules/ui/tab-navigation-base/tab-strip-item").TabStripItem);
+registerElement("img", () => require("@nativescript/core/ui/image").Image);
+registerElement("Label", () => require("@nativescript/core/ui/label").Label);
+registerElement("ListPicker", () => require("@nativescript/core/ui/list-picker").ListPicker);
+registerElement("ListView", () => require("@nativescript/core/ui/list-view").ListView);
+registerElement("Page", () => require("@nativescript/core/ui/page").Page);
+registerElement("Placeholder", () => require("@nativescript/core/ui/placeholder").Placeholder);
+registerElement("Progress", () => require("@nativescript/core/ui/progress").Progress);
+registerElement("ProxyViewContainer", () => require("@nativescript/core/ui/proxy-view-container").ProxyViewContainer);
+registerElement("Repeater", () => require("@nativescript/core/ui/repeater").Repeater);
+registerElement("ScrollView", () => require("@nativescript/core/ui/scroll-view").ScrollView);
+registerElement("SearchBar", () => require("@nativescript/core/ui/search-bar").SearchBar);
+registerElement("SegmentedBar", () => require("@nativescript/core/ui/segmented-bar").SegmentedBar);
+registerElement("SegmentedBarItem", () => require("@nativescript/core/ui/segmented-bar").SegmentedBarItem);
+registerElement("Slider", () => require("@nativescript/core/ui/slider").Slider);
+registerElement("StackLayout", () => require("@nativescript/core/ui/layouts/stack-layout").StackLayout);
+registerElement("FlexboxLayout", () => require("@nativescript/core/ui/layouts/flexbox-layout").FlexboxLayout);
+registerElement("Switch", () => require("@nativescript/core/ui/switch").Switch);
+registerElement("TabView", () => require("@nativescript/core/ui/tab-view").TabView);
+registerElement("TabStrip", () => require("@nativescript/core/ui/tab-navigation-base/tab-strip").TabStrip);
+registerElement("TabStripItem", () => require("@nativescript/core/ui/tab-navigation-base/tab-strip-item").TabStripItem);
registerElement("TabContentItem",
- () => require("tns-core-modules/ui/tab-navigation-base/tab-content-item").TabContentItem);
-registerElement("Tabs", () => require("tns-core-modules/ui/tabs").Tabs);
-registerElement("TextField", () => require("tns-core-modules/ui/text-field").TextField);
-registerElement("TextView", () => require("tns-core-modules/ui/text-view").TextView);
-registerElement("TimePicker", () => require("tns-core-modules/ui/time-picker").TimePicker);
-registerElement("WebView", () => require("tns-core-modules/ui/web-view").WebView);
-registerElement("WrapLayout", () => require("tns-core-modules/ui/layouts/wrap-layout").WrapLayout);
-registerElement("FormattedString", () => require("tns-core-modules/text/formatted-string").FormattedString);
-registerElement("Span", () => require("tns-core-modules/text/span").Span);
-
-registerElement("DetachedContainer", () => require("tns-core-modules/ui/proxy-view-container").ProxyViewContainer,
+ () => require("@nativescript/core/ui/tab-navigation-base/tab-content-item").TabContentItem);
+registerElement("Tabs", () => require("@nativescript/core/ui/tabs").Tabs);
+registerElement("TextField", () => require("@nativescript/core/ui/text-field").TextField);
+registerElement("TextView", () => require("@nativescript/core/ui/text-view").TextView);
+registerElement("TimePicker", () => require("@nativescript/core/ui/time-picker").TimePicker);
+registerElement("WebView", () => require("@nativescript/core/ui/web-view").WebView);
+registerElement("WrapLayout", () => require("@nativescript/core/ui/layouts/wrap-layout").WrapLayout);
+registerElement("FormattedString", () => require("@nativescript/core/text/formatted-string").FormattedString);
+registerElement("Span", () => require("@nativescript/core/text/span").Span);
+
+registerElement("DetachedContainer", () => require("@nativescript/core/ui/proxy-view-container").ProxyViewContainer,
{ skipAddToDom: true });
-registerElement("page-router-outlet", () => require("tns-core-modules/ui/frame").Frame);
+registerElement("page-router-outlet", () => require("@nativescript/core/ui/frame").Frame);
diff --git a/nativescript-angular/file-system/ns-file-system.ts b/nativescript-angular/file-system/ns-file-system.ts
index 222a54c12..2e68c42f2 100644
--- a/nativescript-angular/file-system/ns-file-system.ts
+++ b/nativescript-angular/file-system/ns-file-system.ts
@@ -1,5 +1,5 @@
import { Injectable } from "@angular/core";
-import { knownFolders, Folder, File } from "tns-core-modules/file-system";
+import { knownFolders, Folder, File } from "@nativescript/core/file-system";
// Allows greater flexibility with `file-system` and Angular
// Also provides a way for `file-system` to be mocked for testing
diff --git a/nativescript-angular/forms/forms.module.ts b/nativescript-angular/forms/forms.module.ts
index 50511eafc..17b324c55 100644
--- a/nativescript-angular/forms/forms.module.ts
+++ b/nativescript-angular/forms/forms.module.ts
@@ -1,43 +1,42 @@
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import {
- TextValueAccessor,
- CheckedValueAccessor,
- DateValueAccessor,
- TimeValueAccessor,
- NumberValueAccessor,
- SelectedIndexValueAccessor
+ TextValueAccessor,
+ CheckedValueAccessor,
+ DateValueAccessor,
+ TimeValueAccessor,
+ NumberValueAccessor,
+ SelectedIndexValueAccessor,
} from "./value-accessors";
-export const FORMS_DIRECTIVES = [
+export {
+ TextValueAccessor,
+ CheckedValueAccessor,
+ DateValueAccessor,
+ TimeValueAccessor,
+ SelectedIndexValueAccessor,
+ NumberValueAccessor,
+};
+
+@NgModule({
+ declarations: [
TextValueAccessor,
CheckedValueAccessor,
DateValueAccessor,
TimeValueAccessor,
SelectedIndexValueAccessor,
NumberValueAccessor,
-];
-
-export {
+ ],
+ providers: [],
+ imports: [FormsModule],
+ exports: [
+ FormsModule,
TextValueAccessor,
CheckedValueAccessor,
DateValueAccessor,
TimeValueAccessor,
SelectedIndexValueAccessor,
- NumberValueAccessor
-};
-
-@NgModule({
- declarations: FORMS_DIRECTIVES,
- providers: [
- ],
- imports: [
- FormsModule
- ],
- exports: [
- FormsModule,
- FORMS_DIRECTIVES,
- ]
+ NumberValueAccessor,
+ ],
})
-export class NativeScriptFormsModule {
-}
+export class NativeScriptFormsModule {}
diff --git a/nativescript-angular/forms/value-accessors/base-value-accessor.ts b/nativescript-angular/forms/value-accessors/base-value-accessor.ts
index 5f46ca98a..3b948988a 100644
--- a/nativescript-angular/forms/value-accessors/base-value-accessor.ts
+++ b/nativescript-angular/forms/value-accessors/base-value-accessor.ts
@@ -1,5 +1,5 @@
import { ControlValueAccessor } from "@angular/forms";
-import { View, unsetValue } from "tns-core-modules/ui/core/view";
+import { View, unsetValue } from "@nativescript/core/ui/core/view";
import { isBlank } from "../../lang-facade";
diff --git a/nativescript-angular/forms/value-accessors/checked-value-accessor.ts b/nativescript-angular/forms/value-accessors/checked-value-accessor.ts
index 8bb77ec09..bf5ebf45b 100644
--- a/nativescript-angular/forms/value-accessors/checked-value-accessor.ts
+++ b/nativescript-angular/forms/value-accessors/checked-value-accessor.ts
@@ -1,7 +1,7 @@
import { Directive, ElementRef, forwardRef } from "@angular/core";
import { NG_VALUE_ACCESSOR } from "@angular/forms";
import { BaseValueAccessor } from "./base-value-accessor";
-import { Switch } from "tns-core-modules/ui/switch";
+import { Switch } from "@nativescript/core/ui/switch";
const CHECKED_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
diff --git a/nativescript-angular/forms/value-accessors/date-value-accessor.ts b/nativescript-angular/forms/value-accessors/date-value-accessor.ts
index c7f8419a9..e17488627 100644
--- a/nativescript-angular/forms/value-accessors/date-value-accessor.ts
+++ b/nativescript-angular/forms/value-accessors/date-value-accessor.ts
@@ -1,7 +1,7 @@
import { Directive, ElementRef, forwardRef } from "@angular/core";
import { NG_VALUE_ACCESSOR } from "@angular/forms";
import { BaseValueAccessor } from "./base-value-accessor";
-import { DatePicker } from "tns-core-modules/ui/date-picker";
+import { DatePicker } from "@nativescript/core/ui/date-picker";
const DATE_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
diff --git a/nativescript-angular/forms/value-accessors/index.ts b/nativescript-angular/forms/value-accessors/index.ts
index 351151606..36d656b1b 100644
--- a/nativescript-angular/forms/value-accessors/index.ts
+++ b/nativescript-angular/forms/value-accessors/index.ts
@@ -1,7 +1,10 @@
-export * from "./base-value-accessor";
-export * from "./text-value-accessor";
-export * from "./checked-value-accessor";
-export * from "./date-value-accessor";
-export * from "./time-value-accessor";
-export * from "./number-value-accessor";
-export * from "./selectedIndex-value-accessor";
+export { BaseValueAccessor } from "./base-value-accessor";
+export { TextValueAccessor, TextView } from "./text-value-accessor";
+export { CheckedValueAccessor } from "./checked-value-accessor";
+export { DateValueAccessor } from "./date-value-accessor";
+export { TimeValueAccessor } from "./time-value-accessor";
+export { NumberValueAccessor } from "./number-value-accessor";
+export {
+ SelectedIndexValueAccessor,
+ SelectableView
+} from "./selectedIndex-value-accessor";
diff --git a/nativescript-angular/forms/value-accessors/number-value-accessor.ts b/nativescript-angular/forms/value-accessors/number-value-accessor.ts
index 32275d4ea..46d28a234 100644
--- a/nativescript-angular/forms/value-accessors/number-value-accessor.ts
+++ b/nativescript-angular/forms/value-accessors/number-value-accessor.ts
@@ -1,7 +1,7 @@
import { Directive, ElementRef, forwardRef } from "@angular/core";
import { NG_VALUE_ACCESSOR } from "@angular/forms";
import { BaseValueAccessor } from "./base-value-accessor";
-import { Slider } from "tns-core-modules/ui/slider";
+import { Slider } from "@nativescript/core/ui/slider";
const NUMBER_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
diff --git a/nativescript-angular/forms/value-accessors/selectedIndex-value-accessor.ts b/nativescript-angular/forms/value-accessors/selectedIndex-value-accessor.ts
index 2c9a7ddf1..5deb24f6b 100644
--- a/nativescript-angular/forms/value-accessors/selectedIndex-value-accessor.ts
+++ b/nativescript-angular/forms/value-accessors/selectedIndex-value-accessor.ts
@@ -1,7 +1,7 @@
import { Directive, ElementRef, forwardRef, AfterViewInit } from "@angular/core";
import { NG_VALUE_ACCESSOR } from "@angular/forms";
import { BaseValueAccessor } from "./base-value-accessor";
-import { View } from "tns-core-modules/ui/core/view";
+import { View } from "@nativescript/core/ui/core/view";
const SELECTED_INDEX_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
diff --git a/nativescript-angular/forms/value-accessors/text-value-accessor.ts b/nativescript-angular/forms/value-accessors/text-value-accessor.ts
index 2fc201491..bd9751daf 100644
--- a/nativescript-angular/forms/value-accessors/text-value-accessor.ts
+++ b/nativescript-angular/forms/value-accessors/text-value-accessor.ts
@@ -1,7 +1,7 @@
import { Directive, ElementRef, forwardRef } from "@angular/core";
import { NG_VALUE_ACCESSOR } from "@angular/forms";
import { BaseValueAccessor } from "./base-value-accessor";
-import { View } from "tns-core-modules/ui/core/view";
+import { View } from "@nativescript/core/ui/core/view";
const TEXT_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
diff --git a/nativescript-angular/forms/value-accessors/time-value-accessor.ts b/nativescript-angular/forms/value-accessors/time-value-accessor.ts
index 0eea501ed..da3593f2b 100644
--- a/nativescript-angular/forms/value-accessors/time-value-accessor.ts
+++ b/nativescript-angular/forms/value-accessors/time-value-accessor.ts
@@ -1,7 +1,7 @@
import { Directive, ElementRef, forwardRef } from "@angular/core";
import { NG_VALUE_ACCESSOR } from "@angular/forms";
import { BaseValueAccessor } from "./base-value-accessor";
-import { TimePicker } from "tns-core-modules/ui/time-picker";
+import { TimePicker } from "@nativescript/core/ui/time-picker";
const TIME_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,
diff --git a/nativescript-angular/global.d.ts b/nativescript-angular/global.d.ts
index 6954b2e13..6bb03980d 100644
--- a/nativescript-angular/global.d.ts
+++ b/nativescript-angular/global.d.ts
@@ -1 +1 @@
-///
+///
diff --git a/nativescript-angular/http-client/http-utils.ts b/nativescript-angular/http-client/http-utils.ts
index 706564830..c8508016e 100644
--- a/nativescript-angular/http-client/http-utils.ts
+++ b/nativescript-angular/http-client/http-utils.ts
@@ -1,7 +1,7 @@
import { NSFileSystem } from "../file-system/ns-file-system";
import { Observable, Observer } from "rxjs";
-import { path } from "tns-core-modules/file-system/file-system";
+import { path } from "@nativescript/core/file-system/file-system";
export type httpResponseFactory = (url: string, body: any, status: number) => T;
export type httpErrorFactory = (url: string, body: any, status: number) => any;
diff --git a/nativescript-angular/index.ts b/nativescript-angular/index.ts
index a9b23ecfd..6ee477c3f 100644
--- a/nativescript-angular/index.ts
+++ b/nativescript-angular/index.ts
@@ -1,4 +1,4 @@
-import "tns-core-modules/application";
+import "@nativescript/core/application";
export * from "./platform-common";
export * from "./platform";
@@ -9,6 +9,7 @@ export * from "./resource-loader";
export * from "./nativescript.module";
export * from "./common";
+export * from "./animations";
export * from "./router";
export * from "./file-system";
export * from "./http-client";
diff --git a/nativescript-angular/modal-dialog.ts b/nativescript-angular/modal-dialog.ts
index 0aa0ee079..0ee522dcb 100644
--- a/nativescript-angular/modal-dialog.ts
+++ b/nativescript-angular/modal-dialog.ts
@@ -1,5 +1,4 @@
export {
- ModalDialogHost,
ModalDialogOptions,
ModalDialogParams,
ModalDialogService
diff --git a/nativescript-angular/nativescript.module.ts b/nativescript-angular/nativescript.module.ts
index a4a05d68a..71563721a 100644
--- a/nativescript-angular/nativescript.module.ts
+++ b/nativescript-angular/nativescript.module.ts
@@ -1,7 +1,6 @@
-import "tns-core-modules/globals";
+import "@nativescript/core/globals";
// Require application early to work around a circular import
-import "tns-core-modules/application";
-import "./zone-js/dist/zone-nativescript";
+import "@nativescript/core/application";
import "./polyfills/array";
import "./polyfills/console";
@@ -15,7 +14,7 @@ import {
SystemJsNgModuleLoader,
Optional,
SkipSelf,
- ɵAPP_ROOT as APP_ROOT,
+ ɵINJECTOR_SCOPE,
} from "@angular/core";
import {
@@ -44,7 +43,7 @@ export { DetachedLoader };
PageService,
NativeScriptRendererFactory,
SystemJsNgModuleLoader,
- { provide: APP_ROOT, useValue: true },
+ { provide: ɵINJECTOR_SCOPE, useValue: "root" },
{ provide: ErrorHandler, useFactory: errorHandlerFactory },
{ provide: RendererFactory2, useExisting: NativeScriptRendererFactory },
{ provide: ViewportScroller, useClass: NullViewportScroller },
diff --git a/nativescript-angular/package.json b/nativescript-angular/package.json
index 5d42c9747..58932c5a4 100644
--- a/nativescript-angular/package.json
+++ b/nativescript-angular/package.json
@@ -1,9 +1,11 @@
{
"name": "@nativescript/angular",
- "version": "8.21.0",
+ "version": "9.0.0",
"description": "An Angular renderer that lets you build mobile apps with NativeScript.",
"homepage": "https://www.nativescript.org/",
"bugs": "https://github.com/NativeScript/nativescript-angular/issues",
+ "main": "index.js",
+ "types": "index.d.ts",
"author": {
"name": "NativeScript Team"
},
@@ -23,52 +25,53 @@
"url": "https://github.com/NativeScript/nativescript-angular.git"
},
"scripts": {
+ "setup": "npx rimraf hooks node_modules package-lock.json && npm run pack",
"tslint": "tslint --project tsconfig.json --config tslint.json",
"tsc": "tsc -p tsconfig.json",
"tsc-w": "tsc -p tsconfig.json -w",
- "ngc": "ngc -p tsconfig.json",
- "prepare": "npm run ngc",
- "pack": "npm i && tsc && cd ../build/pack-scripts && npm i && npx ts-node pack-scoped.ts",
- "version": "rm -rf package-lock.json && conventional-changelog -p angular -i ../CHANGELOG.md -s && git add ../CHANGELOG.md",
+ "ngc": "ngc",
+ "ngcc": "ngcc",
+ "prepare": "npm run ngcc && ngc -p tsconfig.json",
+ "pack": "npm i && tsc && npm run prepare && cd ../build/pack-scripts && npm i && npx ts-node pack-scoped.ts",
+ "changelog": "conventional-changelog -p angular -i ../CHANGELOG.md -s",
+ "version": "rm -rf package-lock.json && npm run changelog && git add ../CHANGELOG.md",
"typedoc": "typedoc --tsconfig \"./tsconfig.typedoc.json\" --out ./bin/dist/ng-api-reference --includeDeclarations --name \"NativeScript Angular\" --theme ./node_modules/nativescript-typedoc-theme --excludeExternals --externalPattern \"**/+(tns-core-modules|module|declarations).d.ts\""
},
"bin": {
"update-app-ng-deps": "./bin/update-app-ng-deps"
},
"dependencies": {
- "nativescript-intl": "^3.0.0",
- "reflect-metadata": "^0.1.8"
+ "nativescript-intl": "^3.0.0"
},
"peerDependencies": {
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/router": "~8.2.0",
- "rxjs": "^6.4.0",
- "tns-core-modules": "^6.2.0 || >6.3.0-",
- "typescript": "~3.5.3",
- "zone.js": "^0.9.1"
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/router": "~9.1.0",
+ "rxjs": "~6.5.5",
+ "typescript": "~3.8.3",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/compiler-cli": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/compiler-cli": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
"codelyzer": "^5.1.0",
"conventional-changelog-cli": "^1.3.22",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
"tslint": "^5.5.0",
- "typescript": "~3.5.3",
- "zone.js": "^0.9.1",
+ "typescript": "~3.8.3",
+ "zone.js": "^0.10.3",
"nativescript-typedoc-theme": "git://github.com/NativeScript/nativescript-typedoc-theme.git#master",
"typedoc": "^0.13.0"
}
diff --git a/nativescript-angular/platform-common.ts b/nativescript-angular/platform-common.ts
index 40dc0cec5..35dc2211c 100644
--- a/nativescript-angular/platform-common.ts
+++ b/nativescript-angular/platform-common.ts
@@ -1,13 +1,18 @@
// Initial imports and polyfills
-import "tns-core-modules/globals";
+import "@nativescript/core/globals";
// Require application early to work around a circular import
-import "tns-core-modules/application";
+import "@nativescript/core/application";
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 { profile, uptime } from "@nativescript/core/profiling";
+import { getRootView } from "@nativescript/core/application";
import "./dom-adapter";
+import "nativescript-intl";
+// TODO: refactor core module imports to not require these deep imports
+import { TextView } from "@nativescript/core/ui/text-view";
+import { Color, View } from "@nativescript/core/ui/core/view";
+import { Frame } from "@nativescript/core/ui/frame";
import {
Type,
@@ -36,12 +41,7 @@ import {
LaunchEventData,
exitEvent,
ApplicationEventData,
-} from "tns-core-modules/application";
-import { TextView } from "tns-core-modules/ui/text-view";
-
-import "nativescript-intl";
-import { Color, View } from "tns-core-modules/ui/core/view/view";
-import { Frame } from "tns-core-modules/ui/frame";
+} from "@nativescript/core/application";
export const onBeforeLivesync = new EventEmitter>();
export const onAfterLivesync = new EventEmitter<{ moduleRef?: NgModuleRef; error?: Error }>();
diff --git a/nativescript-angular/platform-providers.ts b/nativescript-angular/platform-providers.ts
index 69b26af05..5941ff7e5 100644
--- a/nativescript-angular/platform-providers.ts
+++ b/nativescript-angular/platform-providers.ts
@@ -1,9 +1,9 @@
import { InjectionToken, Injectable, OnDestroy } from "@angular/core";
-import { Frame, NavigatedData } from "tns-core-modules/ui/frame";
-import { View } from "tns-core-modules/ui/core/view";
-import { Page } from "tns-core-modules/ui/page";
-import { device, Device } from "tns-core-modules/platform";
+import { Frame, NavigatedData } from "@nativescript/core/ui/frame";
+import { View } from "@nativescript/core/ui/core/view";
+import { Page } from "@nativescript/core/ui/page";
+import { device, Device } from "@nativescript/core/platform";
import { BehaviorSubject, Subject, Observable } from "rxjs";
import { distinctUntilChanged } from "rxjs/operators";
diff --git a/nativescript-angular/platform.ts b/nativescript-angular/platform.ts
index 8919d34fd..8dadb4836 100644
--- a/nativescript-angular/platform.ts
+++ b/nativescript-angular/platform.ts
@@ -1,8 +1,3 @@
-// Always import reflect-metadata before @angular/core.
-// It's needed to handle __metadata calls inside @angular/core
-import "reflect-metadata";
-
-// Import platform-common immediately after reflect-metadata - because rest of the polyfills.
import {
NativeScriptPlatformRef,
AppOptions,
diff --git a/nativescript-angular/renderer.ts b/nativescript-angular/renderer.ts
index 51d54edc1..508284f36 100644
--- a/nativescript-angular/renderer.ts
+++ b/nativescript-angular/renderer.ts
@@ -4,10 +4,10 @@ import {
RendererStyleFlags2, ViewEncapsulation,
} from "@angular/core";
-import { Device } from "tns-core-modules/platform";
-import { View, getViewById } from "tns-core-modules/ui/core/view";
-import { addCss } from "tns-core-modules/application";
-import { profile } from "tns-core-modules/profiling";
+import { Device } from "@nativescript/core/platform";
+import { View, getViewById } from "@nativescript/core/ui/core/view";
+import { addCss } from "@nativescript/core/application";
+import { profile } from "@nativescript/core/profiling";
import { APP_ROOT_VIEW, DEVICE, getRootPage } from "./platform-providers";
import { ViewUtil } from "./view-util";
diff --git a/nativescript-angular/resource-loader.ts b/nativescript-angular/resource-loader.ts
index 5503dfa72..be2177d5c 100644
--- a/nativescript-angular/resource-loader.ts
+++ b/nativescript-angular/resource-loader.ts
@@ -1,6 +1,6 @@
import { Injectable } from "@angular/core";
import { ResourceLoader } from "@angular/compiler";
-import { path } from "tns-core-modules/file-system";
+import { path } from "@nativescript/core/file-system";
import { NSFileSystem } from "./file-system/ns-file-system";
diff --git a/nativescript-angular/router/ns-empty-outlet.component.ts b/nativescript-angular/router/ns-empty-outlet.component.ts
index 872210170..06ddc302f 100644
--- a/nativescript-angular/router/ns-empty-outlet.component.ts
+++ b/nativescript-angular/router/ns-empty-outlet.component.ts
@@ -1,5 +1,5 @@
import { Component, ViewChild } from "@angular/core";
-import { Page } from "tns-core-modules/ui/page";
+import { Page } from "@nativescript/core/ui/page";
import { PageRouterOutlet } from "./page-router-outlet";
@Component({
// tslint:disable-next-line:component-selector
diff --git a/nativescript-angular/router/ns-location-strategy.ts b/nativescript-angular/router/ns-location-strategy.ts
index 92da486e7..93d649976 100644
--- a/nativescript-angular/router/ns-location-strategy.ts
+++ b/nativescript-angular/router/ns-location-strategy.ts
@@ -2,7 +2,7 @@ import { Injectable } from "@angular/core";
import { LocationStrategy } from "@angular/common";
import { DefaultUrlSerializer, UrlSegmentGroup, UrlTree, ActivatedRouteSnapshot } from "@angular/router";
import { routerLog, routerError, isLogEnabled } from "../trace";
-import { NavigationTransition, Frame } from "tns-core-modules/ui/frame";
+import { NavigationTransition, Frame } from "@nativescript/core/ui/frame";
import { isPresent } from "../lang-facade";
import { FrameService } from "../platform-providers";
diff --git a/nativescript-angular/router/ns-router-link-active.ts b/nativescript-angular/router/ns-router-link-active.ts
index de2e55395..86ff6b05d 100644
--- a/nativescript-angular/router/ns-router-link-active.ts
+++ b/nativescript-angular/router/ns-router-link-active.ts
@@ -1,7 +1,7 @@
import {
AfterContentInit, ContentChildren, Directive,
ElementRef, Input, OnChanges, OnDestroy,
- QueryList, Renderer
+ QueryList, Renderer2
} from "@angular/core";
import { Subscription } from "rxjs";
@@ -66,7 +66,7 @@ export class NSRouterLinkActive implements OnChanges, OnDestroy, AfterContentIni
@Input() nsRouterLinkActiveOptions: { exact: boolean } = { exact: false };
- constructor(private router: Router, private element: ElementRef, private renderer: Renderer) {
+ constructor(private router: Router, private element: ElementRef, private renderer: Renderer2) {
this.subscription = router.events.subscribe(s => {
if (s instanceof NavigationEnd) {
this.update();
@@ -105,7 +105,7 @@ export class NSRouterLinkActive implements OnChanges, OnDestroy, AfterContentIni
const currentUrlTree = this.router.parseUrl(this.router.url);
const isActiveLinks = this.reduceList(currentUrlTree, this.links);
this.classes.forEach(
- c => this.renderer.setElementClass(
+ c => this.renderer.setStyle(
this.element.nativeElement, c, isActiveLinks));
}
Promise.resolve(hasActiveLinks).then(active => this.active = active);
diff --git a/nativescript-angular/router/ns-router-link.ts b/nativescript-angular/router/ns-router-link.ts
index a6f4273a4..6fb2d7cfc 100644
--- a/nativescript-angular/router/ns-router-link.ts
+++ b/nativescript-angular/router/ns-router-link.ts
@@ -4,8 +4,8 @@ import { ActivatedRoute, Router, UrlTree } from "@angular/router";
import { routerLog, isLogEnabled } from "../trace";
import { RouterExtensions } from "./router-extensions";
import { NavigationOptions } from "./ns-location-strategy";
-import { NavigationTransition } from "tns-core-modules/ui/frame";
-import { isString } from "tns-core-modules/utils/types";
+import { NavigationTransition } from "@nativescript/core/ui/frame";
+import { isString } from "@nativescript/core/utils/types";
// Copied from "@angular/router/src/config"
export type QueryParamsHandling = "merge" | "preserve" | "";
diff --git a/nativescript-angular/router/page-router-outlet.ts b/nativescript-angular/router/page-router-outlet.ts
index 9cdd6634a..28f200ab8 100644
--- a/nativescript-angular/router/page-router-outlet.ts
+++ b/nativescript-angular/router/page-router-outlet.ts
@@ -12,10 +12,10 @@ import {
PRIMARY_OUTLET,
} from "@angular/router";
-import { Device } from "tns-core-modules/platform";
-import { Frame } from "tns-core-modules/ui/frame";
-import { Page, NavigatedData } from "tns-core-modules/ui/page";
-import { profile } from "tns-core-modules/profiling";
+import { Device } from "@nativescript/core/platform";
+import { Frame } from "@nativescript/core/ui/frame";
+import { Page, NavigatedData } from "@nativescript/core/ui/page";
+import { profile } from "@nativescript/core/profiling";
import { BehaviorSubject } from "rxjs";
@@ -343,8 +343,8 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
const destructables = new Set([PageService]);
const injector = Injector.create({
providers: [
- { provide: PageService, useClass: PageService, deps: [Page] },
{ provide: Page, useValue: page },
+ { provide: PageService, useClass: PageService, deps: [Page] },
{ provide: Frame, useValue: this.frame },
{ provide: PageRoute, useValue: new PageRoute(activatedRoute) },
{ provide: ActivatedRoute, useValue: activatedRoute },
diff --git a/nativescript-angular/router/router.module.ts b/nativescript-angular/router/router.module.ts
index 1c8095c09..7d4b4a08f 100644
--- a/nativescript-angular/router/router.module.ts
+++ b/nativescript-angular/router/router.module.ts
@@ -18,34 +18,40 @@ export { NSModuleFactoryLoader } from "./ns-module-factory-loader";
export { NSRouterLink, NSRouterLinkActive, PageRouterOutlet, NSEmptyOutletComponent, NSLocationStrategy };
-const ROUTER_DIRECTIVES = [NSRouterLink, NSRouterLinkActive, PageRouterOutlet, NSEmptyOutletComponent];
-
-const NS_ROUTER_PROVIDERS = [
- {
- provide: NSLocationStrategy,
- useFactory: provideLocationStrategy,
- deps: [[NSLocationStrategy, new Optional(), new SkipSelf()], FrameService],
- },
- { provide: LocationStrategy, useExisting: NSLocationStrategy },
- NativescriptPlatformLocation,
- { provide: PlatformLocation, useExisting: NativescriptPlatformLocation },
- RouterExtensions,
- NSRouteReuseStrategy,
- { provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy },
-];
+export function provideLocationStrategy(
+ locationStrategy: NSLocationStrategy,
+ frameService: FrameService
+): NSLocationStrategy {
+ return locationStrategy ? locationStrategy : new NSLocationStrategy(frameService);
+}
@NgModule({
- declarations: ROUTER_DIRECTIVES,
+ declarations: [
+ NSRouterLink, NSRouterLinkActive, PageRouterOutlet, NSEmptyOutletComponent
+ ],
entryComponents: [NSEmptyOutletComponent],
imports: [RouterModule, NativeScriptCommonModule],
- exports: [RouterModule, ...ROUTER_DIRECTIVES],
+ exports: [RouterModule, NSRouterLink, NSRouterLinkActive, PageRouterOutlet, NSEmptyOutletComponent],
schemas: [NO_ERRORS_SCHEMA],
})
export class NativeScriptRouterModule {
static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders {
return {
ngModule: NativeScriptRouterModule,
- providers: [...RouterModule.forRoot(routes, config).providers, ...NS_ROUTER_PROVIDERS]
+ providers: [
+ ...RouterModule.forRoot(routes, config).providers,
+ {
+ provide: NSLocationStrategy,
+ useFactory: provideLocationStrategy,
+ deps: [[NSLocationStrategy, new Optional(), new SkipSelf()], FrameService],
+ },
+ { provide: LocationStrategy, useExisting: NSLocationStrategy },
+ NativescriptPlatformLocation,
+ { provide: PlatformLocation, useExisting: NativescriptPlatformLocation },
+ RouterExtensions,
+ NSRouteReuseStrategy,
+ { provide: RouteReuseStrategy, useExisting: NSRouteReuseStrategy }
+ ]
};
}
@@ -53,10 +59,3 @@ export class NativeScriptRouterModule {
return { ngModule: NativeScriptRouterModule, providers: RouterModule.forChild(routes).providers };
}
}
-
-export function provideLocationStrategy(
- locationStrategy: NSLocationStrategy,
- frameService: FrameService
-): NSLocationStrategy {
- return locationStrategy ? locationStrategy : new NSLocationStrategy(frameService);
-}
diff --git a/nativescript-angular/testing/src/nativescript_test_component_renderer.ts b/nativescript-angular/testing/src/nativescript_test_component_renderer.ts
index 87ad55660..19aedb833 100644
--- a/nativescript-angular/testing/src/nativescript_test_component_renderer.ts
+++ b/nativescript-angular/testing/src/nativescript_test_component_renderer.ts
@@ -1,6 +1,6 @@
import { Injectable } from "@angular/core";
import { TestComponentRenderer } from "@angular/core/testing";
-import { ProxyViewContainer } from "tns-core-modules/ui/proxy-view-container";
+import { ProxyViewContainer } from "@nativescript/core/ui/proxy-view-container";
import { testingRootView } from "./util";
/**
diff --git a/nativescript-angular/testing/src/util.ts b/nativescript-angular/testing/src/util.ts
index a4f57b05d..f55754c7b 100644
--- a/nativescript-angular/testing/src/util.ts
+++ b/nativescript-angular/testing/src/util.ts
@@ -1,7 +1,6 @@
-
-import { View } from "tns-core-modules/ui/core/view";
-import { Frame } from "tns-core-modules/ui/frame";
-import { LayoutBase } from "tns-core-modules/ui/layouts/layout-base";
+import { View } from "@nativescript/core/ui/core/view";
+import { Frame } from "@nativescript/core/ui/frame";
+import { LayoutBase } from "@nativescript/core/ui/layouts/layout-base";
import { ComponentFixture, TestBed } from "@angular/core/testing";
import { NgModule, Type } from "@angular/core";
import { NativeScriptModule } from "../../nativescript.module";
@@ -9,7 +8,7 @@ import { platformBrowserDynamicTesting } from "@angular/platform-browser-dynamic
import { NS_COMPILER_PROVIDERS } from "../../platform";
import { NATIVESCRIPT_TESTING_PROVIDERS, NativeScriptTestingModule } from "../index";
import { CommonModule } from "@angular/common";
-import { GridLayout } from "tns-core-modules/ui/layouts/grid-layout";
+import { GridLayout } from "@nativescript/core/ui/layouts/grid-layout";
const TESTING_ROOT_ID = "__testing_container";
@@ -102,26 +101,26 @@ export function nsTestBedBeforeEach(
// If there are entry components, we have to reset the testing platform.
//
// There's got to be a better way... (o_O)
- TestBed.resetTestEnvironment();
- @NgModule({
- declarations: entryComponents,
- exports: entryComponents,
- entryComponents: entryComponents
- })
- class EntryComponentsTestModule {
- }
- TestBed.initTestEnvironment(
- EntryComponentsTestModule,
- platformBrowserDynamicTesting(NS_COMPILER_PROVIDERS)
- );
- TestBed.configureTestingModule({
- declarations: components,
- imports: [
- NativeScriptModule, NativeScriptTestingModule, CommonModule,
- ...imports
- ],
- providers: [...providers, ...NATIVESCRIPT_TESTING_PROVIDERS],
- });
+ // TestBed.resetTestEnvironment();
+ // @NgModule({
+ // declarations: entryComponents,
+ // exports: entryComponents,
+ // entryComponents: entryComponents
+ // })
+ // class EntryComponentsTestModule {
+ // }
+ // TestBed.initTestEnvironment(
+ // EntryComponentsTestModule,
+ // platformBrowserDynamicTesting(NS_COMPILER_PROVIDERS)
+ // );
+ // TestBed.configureTestingModule({
+ // declarations: components,
+ // imports: [
+ // NativeScriptModule, NativeScriptTestingModule, CommonModule,
+ // ...imports
+ // ],
+ // providers: [...providers, ...NATIVESCRIPT_TESTING_PROVIDERS],
+ // });
}
TestBed.compileComponents()
.then(() => done())
diff --git a/nativescript-angular/trace.ts b/nativescript-angular/trace.ts
index 2ca450110..0c3060da3 100644
--- a/nativescript-angular/trace.ts
+++ b/nativescript-angular/trace.ts
@@ -1,5 +1,5 @@
-import { write, categories, messageType } from "tns-core-modules/trace";
-export { isEnabled as isLogEnabled } from "tns-core-modules/trace";
+import { write, categories, messageType } from "@nativescript/core/trace";
+export { isEnabled as isLogEnabled } from "@nativescript/core/trace";
export const animationsTraceCategory = "ns-animations";
export const rendererTraceCategory = "ns-renderer";
diff --git a/nativescript-angular/tsconfig.json b/nativescript-angular/tsconfig.json
index 79e3addf9..ef49ccd73 100644
--- a/nativescript-angular/tsconfig.json
+++ b/nativescript-angular/tsconfig.json
@@ -11,11 +11,12 @@
"declaration": true,
"removeComments": false,
"noEmitOnError": true,
+ "skipLibCheck": true,
"noImplicitAny": false,
"lib": [
+ "es2017",
"dom",
- "es6",
- "es2015.iterable"
+ "es6"
],
"baseUrl": "."
},
@@ -23,7 +24,8 @@
"genDir": ".",
"skipMetadataEmit": false,
"skipTemplateCodegen": true,
- "strictMetadataEmit": true
+ "strictMetadataEmit": true,
+ "enableIvy": false
},
"include": [
"**/*.ts"
diff --git a/nativescript-angular/tsconfig.typedoc.json b/nativescript-angular/tsconfig.typedoc.json
index e6cbd184d..3c35c215e 100644
--- a/nativescript-angular/tsconfig.typedoc.json
+++ b/nativescript-angular/tsconfig.typedoc.json
@@ -10,6 +10,7 @@
"declaration": true,
"removeComments": false,
"noEmitOnError": true,
+ "skipLibCheck": true,
"noImplicitAny": false,
"lib": [
"dom",
@@ -19,7 +20,6 @@
"baseUrl": ".",
"paths": {
"*": [
- "./node_modules/tns-core-modules/*",
"./node_modules/*"
]
}
@@ -32,9 +32,9 @@
},
"exclude": [
"./node_modules",
- "tns-core-modules/references.d.ts",
- "tns-core-modules/node_modules",
- "tns-core-modules/ui/frame/transition-definitions.android.d.ts",
+ "@nativescript/core/references.d.ts",
+ "@nativescript/core/node_modules",
+ "@nativescript/core/ui/frame/transition-definitions.android.d.ts",
"./zone-js",
"./index.ts",
"./bin",
diff --git a/nativescript-angular/view-util.ts b/nativescript-angular/view-util.ts
index 97a2f6ba3..c16794e6c 100644
--- a/nativescript-angular/view-util.ts
+++ b/nativescript-angular/view-util.ts
@@ -1,8 +1,8 @@
-import { isDefined } from "tns-core-modules/utils/types";
-import { View, unsetValue } from "tns-core-modules/ui/core/view";
-import { Placeholder } from "tns-core-modules/ui/placeholder";
-import { ContentView } from "tns-core-modules/ui/content-view";
-import { LayoutBase } from "tns-core-modules/ui/layouts/layout-base";
+import { isDefined } from "@nativescript/core/utils/types";
+import { View, unsetValue } from "@nativescript/core/ui/core/view";
+import { Placeholder } from "@nativescript/core/ui/placeholder";
+import { ContentView } from "@nativescript/core/ui/content-view";
+import { LayoutBase } from "@nativescript/core/ui/layouts/layout-base";
import {
CommentNode,
InvisibleNode,
@@ -17,15 +17,15 @@ import {
isView,
} from "./element-registry";
-import { platformNames, Device } from "tns-core-modules/platform";
+import { platformNames, Device } from "@nativescript/core/platform";
import { viewUtilLog as traceLog, isLogEnabled } from "./trace";
const ELEMENT_NODE_TYPE = 1;
const XML_ATTRIBUTES = Object.freeze(["style", "rows", "columns", "fontAttributes"]);
const whiteSpaceSplitter = /\s+/;
-export type ViewExtensions = ViewExtensions;
-export type NgView = NgView;
+// export type ViewExtensions = ViewExtensions;
+// export type NgView = NgView;
export type NgLayoutBase = LayoutBase & ViewExtensions;
export type NgContentView = ContentView & ViewExtensions;
export type NgPlaceholder = Placeholder & ViewExtensions;
diff --git a/tests/app/first.component.ts b/tests/app/first.component.ts
index 089e82f36..e76376f11 100644
--- a/tests/app/first.component.ts
+++ b/tests/app/first.component.ts
@@ -1,6 +1,6 @@
import { Router, ActivatedRoute } from "@angular/router";
import { Component, Inject } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { HOOKS_LOG, BaseComponent } from "./base.component";
import { BehaviorSubject } from "rxjs";
diff --git a/tests/app/lazy-loaded.module.ts b/tests/app/lazy-loaded.module.ts
index ecc2bb19e..758dd030a 100644
--- a/tests/app/lazy-loaded.module.ts
+++ b/tests/app/lazy-loaded.module.ts
@@ -1,8 +1,8 @@
import { Component, NgModule } from "@angular/core";
-import { NativeScriptCommonModule } from "nativescript-angular/common";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
-import { ModalDialogParams } from "nativescript-angular/directives/dialogs";
-import { Page } from "tns-core-modules/ui/page";
+import { NativeScriptCommonModule } from "@nativescript/angular/common";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
+import { ModalDialogParams } from "@nativescript/angular/directives/dialogs";
+import { Page } from "@nativescript/core/ui/page";
import { lazyLoadHooksLogProvider } from "./main";
import { SecondComponent } from "./second.component";
diff --git a/tests/app/main.ts b/tests/app/main.ts
index 9e11fb3a6..4af73fabe 100644
--- a/tests/app/main.ts
+++ b/tests/app/main.ts
@@ -2,20 +2,20 @@
// should be first in order to load some required settings
// (like globals and reflect-metadata)
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
-import { NativeScriptFormsModule } from "nativescript-angular/forms";
+import { NativeScriptModule } from "@nativescript/angular";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
+import { NativeScriptFormsModule } from "@nativescript/angular/forms";
import { AppComponent } from "./app.component";
import { GestureComponent } from "./snippets/gestures.component";
import { LayoutsComponent } from "./snippets/layouts.component";
import { IconFontComponent } from "./snippets/icon-font.component";
-import { APP_ROOT_VIEW } from "nativescript-angular/platform-providers";
-import { Page } from "tns-core-modules/ui/page";
-import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout";
+import { APP_ROOT_VIEW } from "@nativescript/angular/platform-providers";
+import { Page } from "@nativescript/core/ui/page";
+import { StackLayout } from "@nativescript/core/ui/layouts/stack-layout";
-import * as application from "tns-core-modules/application";
+import * as application from "@nativescript/core/application";
import "tns-core-modules/ui/styling/style";
import "tns-core-modules/ui/frame";
import { HOOKS_LOG } from "./base.component";
@@ -29,14 +29,14 @@ import { InjectionToken, NgModule, NgModuleFactoryLoader } from "@angular/core";
import { PageNavigationApp } from "./snippets/navigation/page-outlet";
import { NavigationApp } from "./snippets/navigation/router-outlet";
-import { rendererTraceCategory, routerTraceCategory } from "nativescript-angular/trace";
+import { rendererTraceCategory, routerTraceCategory } from "@nativescript/angular/trace";
import { BehaviorSubject } from "rxjs";
-import { GridLayout, ItemSpec } from "tns-core-modules/ui/layouts/grid-layout/grid-layout";
+import { GridLayout, ItemSpec } from "@nativescript/core/ui/layouts/grid-layout/grid-layout";
-import { enable, addCategories, categories } from "tns-core-modules/trace";
-import { Color } from "tns-core-modules/color/color";
+import { enable, addCategories, categories } from "@nativescript/core/trace";
+import { Color } from "@nativescript/core/color/color";
addCategories(rendererTraceCategory);
// addCategories(routerTraceCategory);
diff --git a/tests/app/second.component.ts b/tests/app/second.component.ts
index 68596f760..b05e90424 100644
--- a/tests/app/second.component.ts
+++ b/tests/app/second.component.ts
@@ -1,7 +1,7 @@
import { Router, ActivatedRoute } from "@angular/router";
import { Component, Inject, OnInit } from "@angular/core";
import { Location } from "@angular/common";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
import { HOOKS_LOG, BaseComponent } from "./base.component";
import { BehaviorSubject } from "rxjs";
diff --git a/tests/app/snippets/gestures.component.ts b/tests/app/snippets/gestures.component.ts
index a60502b11..b469f37aa 100644
--- a/tests/app/snippets/gestures.component.ts
+++ b/tests/app/snippets/gestures.component.ts
@@ -5,7 +5,7 @@ import {
PinchGestureEventData,
RotationGestureEventData,
SwipeGestureEventData,
- TouchGestureEventData} from "tns-core-modules/ui/gestures";
+ TouchGestureEventData} from "@nativescript/core/ui/gestures";
@Component({
selector: "gestures",
diff --git a/tests/app/snippets/navigation/config-snippets.ts b/tests/app/snippets/navigation/config-snippets.ts
index 5316d010f..05fbf8e4b 100644
--- a/tests/app/snippets/navigation/config-snippets.ts
+++ b/tests/app/snippets/navigation/config-snippets.ts
@@ -14,7 +14,7 @@ export const routes = [
// << router-config
// >> router-provider
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
@NgModule({
bootstrap: [GroceriesApp],
@@ -27,7 +27,7 @@ export class GroceriesAppModule { }
// << router-provider
// >> router-bootstrap
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
// >> (hide)
function start_snippet() {
// << (hide)
diff --git a/tests/app/snippets/navigation/page-outlet.ts b/tests/app/snippets/navigation/page-outlet.ts
index 3e1e9fbf8..1a95086d5 100644
--- a/tests/app/snippets/navigation/page-outlet.ts
+++ b/tests/app/snippets/navigation/page-outlet.ts
@@ -2,9 +2,9 @@ import { ApplicationRef } from "@angular/core";
import { Router, NavigationStart, NavigationEnd } from "@angular/router";
// >> page-outlet-example
import { Component, NgModule } from "@angular/core";
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
-import { NativeScriptModule } from "nativescript-angular/nativescript.module";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
+import { NativeScriptModule } from "@nativescript/angular";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { routes } from "./app.routes";
import { FirstComponent, SecondComponent } from "./navigation-common";
diff --git a/tests/app/snippets/navigation/route-params.ts b/tests/app/snippets/navigation/route-params.ts
index 23148ded4..59639499e 100644
--- a/tests/app/snippets/navigation/route-params.ts
+++ b/tests/app/snippets/navigation/route-params.ts
@@ -11,7 +11,7 @@ class MyComponent {
// >> router-params-page-route
-import { PageRoute } from "nativescript-angular/router";
+import { PageRoute } from "@nativescript/angular/router";
import { switchMap } from "rxjs/operators";
class MyPageComponent {
diff --git a/tests/app/snippets/navigation/router-extensions.ts b/tests/app/snippets/navigation/router-extensions.ts
index ae8c8c206..ca640506b 100644
--- a/tests/app/snippets/navigation/router-extensions.ts
+++ b/tests/app/snippets/navigation/router-extensions.ts
@@ -1,5 +1,5 @@
import { Component } from "@angular/core";
-import { RouterExtensions } from "nativescript-angular/router";
+import { RouterExtensions } from "@nativescript/angular/router";
@Component({
// ...
diff --git a/tests/app/snippets/navigation/router-outlet.ts b/tests/app/snippets/navigation/router-outlet.ts
index df15730bf..b18fedc31 100644
--- a/tests/app/snippets/navigation/router-outlet.ts
+++ b/tests/app/snippets/navigation/router-outlet.ts
@@ -1,8 +1,8 @@
import { ApplicationRef } from "@angular/core";
// >> router-outlet-example
import { Component, NgModule } from "@angular/core";
-import { platformNativeScriptDynamic } from "nativescript-angular/platform";
-import { NativeScriptRouterModule } from "nativescript-angular/router";
+import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
+import { NativeScriptRouterModule } from "@nativescript/angular/router";
import { Router, NavigationStart, NavigationEnd } from "@angular/router";
import { routes } from "./app.routes";
import { FirstComponent, SecondComponent } from "./navigation-common";
diff --git a/tests/app/tests/detached-loader-tests.ts b/tests/app/tests/detached-loader-tests.ts
index 1168ea3f8..b576c7b4c 100644
--- a/tests/app/tests/detached-loader-tests.ts
+++ b/tests/app/tests/detached-loader-tests.ts
@@ -1,7 +1,11 @@
// make sure you import mocha-config before @angular/core
-import { ChangeDetectionStrategy, Component, ViewChild } from "@angular/core";
-import { DetachedLoader } from "nativescript-angular";
-import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "nativescript-angular/testing";
+import { NgModule, ChangeDetectionStrategy, Component, ViewChild } from "@angular/core";
+import { ComponentFixture, TestBed } from "@angular/core/testing";
+import { DetachedLoader, NativeScriptModule } from "@nativescript/angular";
+import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender, NATIVESCRIPT_TESTING_PROVIDERS, NativeScriptTestingModule } from "@nativescript/angular/testing";
+import { platformBrowserDynamicTesting } from "@angular/platform-browser-dynamic/testing";
+import { NS_COMPILER_PROVIDERS } from "@nativescript/angular/platform";
+import { CommonModule } from "@angular/common";
@Component({
template: ``
@@ -35,7 +39,35 @@ export class LoaderComponent extends LoaderComponentBase {}
export class LoaderComponentOnPush extends LoaderComponentBase { }
describe("DetachedLoader", function() {
this.timeout(4000);
- beforeEach(nsTestBedBeforeEach([LoaderComponent, LoaderComponentOnPush], [], [], [TestComponent]));
+ // beforeEach(nsTestBedBeforeEach([LoaderComponent, LoaderComponentOnPush], [], [], [TestComponent]));
+ beforeEach((done) => {
+ TestBed.resetTestEnvironment();
+ @NgModule({
+ declarations: [LoaderComponent, LoaderComponentOnPush, TestComponent],
+ exports: [LoaderComponent, LoaderComponentOnPush, TestComponent],
+ entryComponents: [TestComponent]
+ })
+ class EntryComponentsTestModule {
+ }
+ TestBed.initTestEnvironment(
+ EntryComponentsTestModule,
+ platformBrowserDynamicTesting(NS_COMPILER_PROVIDERS)
+ );
+ TestBed.configureTestingModule({
+ declarations: [LoaderComponent, LoaderComponentOnPush, TestComponent],
+ imports: [
+ NativeScriptModule, NativeScriptTestingModule, CommonModule,
+ ],
+ providers: [...NATIVESCRIPT_TESTING_PROVIDERS],
+ });
+ TestBed.compileComponents()
+ .then(() => done())
+ .catch((e) => {
+ console.log(`Failed to instantiate test component with error: ${e}`);
+ console.log(e.stack);
+ done();
+ });
+ });
afterEach(nsTestBedAfterEach());
it("creates component", () => {
diff --git a/tests/app/tests/http-client-ns-backend.ts b/tests/app/tests/http-client-ns-backend.ts
index e5baf8d2c..cb58f59be 100644
--- a/tests/app/tests/http-client-ns-backend.ts
+++ b/tests/app/tests/http-client-ns-backend.ts
@@ -1,10 +1,10 @@
// make sure you import mocha-config before @angular/core
import { assert } from "./test-config";
-import { NSFileSystem } from "nativescript-angular/file-system/ns-file-system";
-import { NsHttpBackEnd } from "nativescript-angular/http-client";
+import { NSFileSystem } from "@nativescript/angular/file-system/ns-file-system";
+import { NsHttpBackEnd } from "@nativescript/angular/http-client";
import { XhrFactory, HttpRequest, HttpResponse, HttpErrorResponse } from "@angular/common/http";
-import { File } from "tns-core-modules/file-system";
+import { File } from "@nativescript/core/file-system";
class NSFileSystemMock implements NSFileSystem {
public currentApp(): any {
diff --git a/tests/app/tests/list-view-tests.ts b/tests/app/tests/list-view-tests.ts
index ee28a9c8c..d0db7823c 100644
--- a/tests/app/tests/list-view-tests.ts
+++ b/tests/app/tests/list-view-tests.ts
@@ -1,8 +1,8 @@
import { assert } from "./test-config";
import { Component, Input, ViewChild } from "@angular/core";
import { ComponentFixture, async } from "@angular/core/testing";
-import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "nativescript-angular/testing";
-import { ListViewComponent } from "nativescript-angular/directives";
+import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "@nativescript/angular/testing";
+import { ListViewComponent } from "@nativescript/angular/directives";
// import trace = require("trace");
// trace.setCategories("ns-list-view, " + trace.categories.Navigation);
// trace.enable();
diff --git a/tests/app/tests/modal-dialog.ts b/tests/app/tests/modal-dialog.ts
index 8c6fb9760..57b9d5863 100644
--- a/tests/app/tests/modal-dialog.ts
+++ b/tests/app/tests/modal-dialog.ts
@@ -1,16 +1,21 @@
// make sure you import mocha-config before @angular/core
import { assert } from "./test-config";
-import { Component, ViewContainerRef } from "@angular/core";
-import { Page } from "tns-core-modules/ui/page";
-import { topmost } from "tns-core-modules/ui/frame";
-import { ModalDialogParams, ModalDialogService } from "nativescript-angular/directives/dialogs";
+import { NgModule, Component, ViewContainerRef } from "@angular/core";
+import { Page } from "@nativescript/core/ui/page";
+import { topmost } from "@nativescript/core/ui/frame";
+import { ModalDialogParams, ModalDialogService } from "@nativescript/angular/directives/dialogs";
+
+import { device, isIOS } from "@nativescript/core/platform";
+
+import { ComponentFixture, TestBed, async } from "@angular/core/testing";
+import { nsTestBedRender, nsTestBedAfterEach, nsTestBedBeforeEach, NATIVESCRIPT_TESTING_PROVIDERS, NativeScriptTestingModule } from "@nativescript/angular/testing";
+import { NSLocationStrategy, Outlet } from "@nativescript/angular";
+import { FrameService } from "@nativescript/angular";
+import { DetachedLoader, NativeScriptModule } from "@nativescript/angular";
+import { platformBrowserDynamicTesting } from "@angular/platform-browser-dynamic/testing";
+import { NS_COMPILER_PROVIDERS } from "@nativescript/angular/platform";
+import { CommonModule } from "@angular/common";
-import { device, isIOS } from "tns-core-modules/platform";
-
-import { ComponentFixture, async } from "@angular/core/testing";
-import { nsTestBedRender, nsTestBedAfterEach, nsTestBedBeforeEach } from "nativescript-angular/testing";
-import { NSLocationStrategy, Outlet } from "nativescript-angular/router/ns-location-strategy";
-import { FrameService } from "nativescript-angular";
import { FakeFrameService } from "./ns-location-strategy";
const CLOSE_WAIT = isIOS ? 1000 : 0;
@@ -57,11 +62,39 @@ export class SuccessComponent {
describe("modal-dialog", () => {
- beforeEach(nsTestBedBeforeEach(
- [FailComponent, SuccessComponent],
- [{ provide: FrameService, useValue: new FakeFrameService() }, NSLocationStrategy],
- [],
- [ModalComponent]));
+ // beforeEach(nsTestBedBeforeEach(
+ // [FailComponent, SuccessComponent],
+ // [{ provide: FrameService, useValue: new FakeFrameService() }, NSLocationStrategy],
+ // [],
+ // [ModalComponent]));
+ beforeEach((done) => {
+ TestBed.resetTestEnvironment();
+ @NgModule({
+ declarations: [FailComponent, SuccessComponent, ModalComponent],
+ exports: [FailComponent, SuccessComponent, ModalComponent],
+ entryComponents: [ModalComponent]
+ })
+ class EntryComponentsTestModule {
+ }
+ TestBed.initTestEnvironment(
+ EntryComponentsTestModule,
+ platformBrowserDynamicTesting(NS_COMPILER_PROVIDERS)
+ );
+ TestBed.configureTestingModule({
+ declarations: [FailComponent, SuccessComponent, ModalComponent],
+ imports: [
+ NativeScriptModule, NativeScriptTestingModule, CommonModule,
+ ],
+ providers: [{ provide: FrameService, useValue: new FakeFrameService() }, NSLocationStrategy, ...NATIVESCRIPT_TESTING_PROVIDERS],
+ });
+ TestBed.compileComponents()
+ .then(() => done())
+ .catch((e) => {
+ console.log(`Failed to instantiate test component with error: ${e}`);
+ console.log(e.stack);
+ done();
+ });
+ });
afterEach(nsTestBedAfterEach());
before((done) => {
// HACK: Wait for the navigations from the test runner app
diff --git a/tests/app/tests/ns-location-strategy.ts b/tests/app/tests/ns-location-strategy.ts
index 1c1ee221d..beaf89fc8 100644
--- a/tests/app/tests/ns-location-strategy.ts
+++ b/tests/app/tests/ns-location-strategy.ts
@@ -1,11 +1,11 @@
// make sure you import mocha-config before @angular/core
import { assert } from "./test-config";
import { DefaultUrlSerializer, UrlTree } from "@angular/router";
-import { NSLocationStrategy, LocationState, Outlet } from "nativescript-angular/router/ns-location-strategy";
-import { Frame, BackstackEntry, NavigationEntry } from "tns-core-modules/ui/frame";
-import { Page } from "tns-core-modules/ui/page";
-import { View } from "tns-core-modules/ui/core/view";
-import { FrameService } from "nativescript-angular/platform-providers";
+import { NSLocationStrategy, LocationState, Outlet } from "@nativescript/angular";
+import { Frame, BackstackEntry, NavigationEntry } from "@nativescript/core/ui/frame";
+import { Page } from "@nativescript/core/ui/page";
+import { View } from "@nativescript/core/ui/core/view";
+import { FrameService } from "@nativescript/angular/platform-providers";
export class FakeFrameService extends FrameService {
private frame: Frame;
diff --git a/tests/app/tests/ns-router-link.ts b/tests/app/tests/ns-router-link.ts
index 091e0637d..bc4a15d84 100644
--- a/tests/app/tests/ns-router-link.ts
+++ b/tests/app/tests/ns-router-link.ts
@@ -1,6 +1,6 @@
-import {NSRouterLink} from "nativescript-angular/router/ns-router-link";
+import {NSRouterLink} from "@nativescript/angular/router/ns-router-link";
import {ActivatedRoute, Router} from "@angular/router";
-import {RouterExtensions} from "nativescript-angular/router";
+import {RouterExtensions} from "@nativescript/angular/router";
import {assert, fake, spy, stub} from "./test-config";
import {SinonStub} from "sinon";
diff --git a/tests/app/tests/platform-filter-components.ts b/tests/app/tests/platform-filter-components.ts
index 3a35843c1..3cbd68a2d 100644
--- a/tests/app/tests/platform-filter-components.ts
+++ b/tests/app/tests/platform-filter-components.ts
@@ -2,9 +2,9 @@
import { assert } from "./test-config";
import { Component, ElementRef } from "@angular/core";
import { dumpView, createDevice } from "./test-utils";
-import { DEVICE } from "nativescript-angular/platform-providers";
-import { platformNames } from "tns-core-modules/platform";
-import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "nativescript-angular/testing";
+import { DEVICE } from "@nativescript/angular/platform-providers";
+import { platformNames } from "@nativescript/core/platform";
+import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "@nativescript/angular/testing";
@Component({
template: `
diff --git a/tests/app/tests/property-sets.ts b/tests/app/tests/property-sets.ts
index 20669874b..c4e656ebb 100644
--- a/tests/app/tests/property-sets.ts
+++ b/tests/app/tests/property-sets.ts
@@ -1,14 +1,14 @@
// make sure you import mocha-config before @angular/core
import {assert} from "./test-config";
-import {View} from "tns-core-modules/ui/core/view";
-import {ViewUtil} from "nativescript-angular/view-util";
+import {View} from "@nativescript/core/ui/core/view";
+import {ViewUtil} from "@nativescript/angular/view-util";
import {
NgView,
ViewExtensions,
ViewClassMeta,
-} from "nativescript-angular/element-registry";
-import {Red} from "tns-core-modules/color/known-colors";
-import {device, platformNames} from "tns-core-modules/platform";
+} from "@nativescript/angular/element-registry";
+import {Red} from "@nativescript/core/color/known-colors";
+import {device, platformNames} from "@nativescript/core/platform";
import {createDevice} from "./test-utils";
class TestView extends View implements NgView {
diff --git a/tests/app/tests/renderer-tests.ts b/tests/app/tests/renderer-tests.ts
index 2f74a07a5..03ace86af 100644
--- a/tests/app/tests/renderer-tests.ts
+++ b/tests/app/tests/renderer-tests.ts
@@ -2,21 +2,14 @@
import { assert } from "./test-config";
import { Component, ComponentRef, ElementRef, NgZone, Renderer2, ViewChild } from "@angular/core";
-import { ProxyViewContainer } from "tns-core-modules/ui/proxy-view-container";
-import { Red } from "tns-core-modules/color/known-colors";
+import { ProxyViewContainer, LayoutBase, StackLayout, ContentView, Button, isIOS, View, Label } from "@nativescript/core";
+import { Red } from "@nativescript/core/color/known-colors";
import { dumpView } from "./test-utils";
-import { LayoutBase } from "tns-core-modules/ui/layouts/layout-base";
-import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout";
-import { ContentView } from "tns-core-modules/ui/content-view";
-import { NgView, registerElement } from "nativescript-angular/element-registry";
-import { Button } from "tns-core-modules/ui/button";
-import * as view from "tns-core-modules/ui/core/view";
-import { isIOS } from "tns-core-modules/platform";
-import { View, fontInternalProperty, backgroundInternalProperty } from "tns-core-modules/ui/core/view"
-import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "nativescript-angular/testing";
+import { registerElement } from "@nativescript/angular";
+import { fontInternalProperty, backgroundInternalProperty } from "@nativescript/core/ui/core/view"
+import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "@nativescript/angular/testing";
import { ComponentFixture, TestBed, async } from "@angular/core/testing";
import { Observable, ReplaySubject } from "rxjs";
-import { Label } from "tns-core-modules/ui/label/label";
@Component({
template: ``
diff --git a/tests/app/tests/router-module-tests.ts b/tests/app/tests/router-module-tests.ts
index 8a8ade953..4b3f0be43 100644
--- a/tests/app/tests/router-module-tests.ts
+++ b/tests/app/tests/router-module-tests.ts
@@ -1,13 +1,13 @@
// make sure you import mocha-config before @angular/core
import { Component, ViewChild } from "@angular/core";
-import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "nativescript-angular/testing";
-import { NativeScriptRouterModule, RouterExtensions } from "nativescript-angular/router";
-import { NSRouterLink } from "nativescript-angular/router/ns-router-link";
-import { NSLocationStrategy } from "nativescript-angular/router/ns-location-strategy";
+import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "@nativescript/angular/testing";
+import { NativeScriptRouterModule, RouterExtensions } from "@nativescript/angular/router";
+import { NSRouterLink } from "@nativescript/angular/router/ns-router-link";
+import { NSLocationStrategy } from "@nativescript/angular";
import { assert } from "~/tests/test-config";
import { ActivatedRoute, Router, RouteReuseStrategy } from "@angular/router";
import { LocationStrategy, PlatformLocation } from "@angular/common";
-import { NSRouteReuseStrategy } from "nativescript-angular/router/ns-route-reuse-strategy";
+import { NSRouteReuseStrategy } from "@nativescript/angular/router/ns-route-reuse-strategy";
@Component({
template: ``
diff --git a/tests/app/tests/snippets.ts b/tests/app/tests/snippets.ts
index b97b3285a..42e667c1d 100644
--- a/tests/app/tests/snippets.ts
+++ b/tests/app/tests/snippets.ts
@@ -5,7 +5,7 @@ import { GestureComponent } from "../snippets/gestures.component";
import { LayoutsComponent } from "../snippets/layouts.component";
import { IconFontComponent } from "../snippets/icon-font.component";
-import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "nativescript-angular/testing";
+import { nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender } from "@nativescript/angular/testing";
import { ComponentRef } from "@angular/core";
describe("Snippets", () => {
diff --git a/tests/app/tests/style-properties.ts b/tests/app/tests/style-properties.ts
index b9510361f..56b0b49be 100644
--- a/tests/app/tests/style-properties.ts
+++ b/tests/app/tests/style-properties.ts
@@ -1,12 +1,12 @@
// make sure you import mocha-config before @angular/core
import { assert } from "./test-config";
-import { TextField } from "tns-core-modules/ui/text-field";
-import { Red, Lime } from "tns-core-modules/color/known-colors";
-import { NativeScriptRendererFactory, NativeScriptRenderer } from "nativescript-angular/renderer";
-import { device } from "tns-core-modules/platform";
+import { TextField } from "@nativescript/core/ui/text-field";
+import { Red, Lime } from "@nativescript/core/color/known-colors";
+import { NativeScriptRendererFactory, NativeScriptRenderer } from "@nativescript/angular/renderer";
+import { device } from "@nativescript/core/platform";
import { ViewEncapsulation, RendererType2, Renderer2 } from "@angular/core";
-import { NgView } from "nativescript-angular/view-util";
-import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout";
+import { NgView } from "@nativescript/angular/view-util";
+import { StackLayout } from "@nativescript/core/ui/layouts/stack-layout";
describe("Setting style properties", () => {
let renderer: NativeScriptRenderer = null;
diff --git a/tests/app/tests/test-main.ts b/tests/app/tests/test-main.ts
index b9587882b..241c407a5 100644
--- a/tests/app/tests/test-main.ts
+++ b/tests/app/tests/test-main.ts
@@ -1,3 +1,3 @@
import "nativescript-angular/zone-js/testing.mocha";
-import {nsTestBedInit} from "nativescript-angular/testing";
+import {nsTestBedInit} from "@nativescript/angular/testing";
nsTestBedInit();
diff --git a/tests/app/tests/test-utils.ts b/tests/app/tests/test-utils.ts
index 660bd1a1c..867641684 100644
--- a/tests/app/tests/test-utils.ts
+++ b/tests/app/tests/test-utils.ts
@@ -1,6 +1,6 @@
-import { View } from "tns-core-modules/ui/core/view";
-import { TextBase } from "tns-core-modules/ui/text-base";
-import { Device } from "tns-core-modules/platform";
+import { View } from "@nativescript/core/ui/core/view";
+import { TextBase } from "@nativescript/core/ui/text-base";
+import { Device } from "@nativescript/core/platform";
function getChildren(view: View): Array {
let children: Array = [];
diff --git a/tests/app/tests/third-party-view.ts b/tests/app/tests/third-party-view.ts
index af933f5da..31c3bc9e2 100644
--- a/tests/app/tests/third-party-view.ts
+++ b/tests/app/tests/third-party-view.ts
@@ -1,4 +1,4 @@
-import {ContentView} from "tns-core-modules/ui/content-view";
+import {ContentView} from "@nativescript/core/ui/content-view";
// >> third-party-simple-view
export class SimpleTag extends ContentView {
diff --git a/tests/app/tests/third-party.ts b/tests/app/tests/third-party.ts
index e87925384..889ca44e8 100644
--- a/tests/app/tests/third-party.ts
+++ b/tests/app/tests/third-party.ts
@@ -1,11 +1,11 @@
// make sure you import mocha-config before @angular/core
import {assert} from "./test-config";
import {Component, ComponentRef, Directive, TemplateRef, ViewContainerRef} from "@angular/core";
-import {View} from "tns-core-modules/ui/core/view";
-import {Label} from "tns-core-modules/ui/label";
-import {nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender} from "nativescript-angular/testing";
+import {View} from "@nativescript/core/ui/core/view";
+import {Label} from "@nativescript/core/ui/label";
+import {nsTestBedAfterEach, nsTestBedBeforeEach, nsTestBedRender} from "@nativescript/angular/testing";
// >> third-party-simple-view-registration
-import {registerElement} from "nativescript-angular/element-registry";
+import {registerElement} from "@nativescript/angular/element-registry";
registerElement("third-party-view", () => require("./third-party-view").SimpleTag);
// << third-party-simple-view-registration
diff --git a/tests/app/tests/value-accessor-tests.ts b/tests/app/tests/value-accessor-tests.ts
index 0ee3b4bd1..36623e02a 100644
--- a/tests/app/tests/value-accessor-tests.ts
+++ b/tests/app/tests/value-accessor-tests.ts
@@ -1,12 +1,12 @@
// make sure you import mocha-config before @angular/core
import { assert } from "./test-config";
-import { View } from "tns-core-modules/ui/core/view";
-import { Slider } from "tns-core-modules/ui/slider";
-import { Switch } from "tns-core-modules/ui/switch";
-import { DatePicker } from "tns-core-modules/ui/date-picker";
-import { TimePicker } from "tns-core-modules/ui/time-picker";
-import { ListPicker } from "tns-core-modules/ui/list-picker";
-import { TextField } from "tns-core-modules/ui/text-field";
+import { View } from "@nativescript/core/ui/core/view";
+import { Slider } from "@nativescript/core/ui/slider";
+import { Switch } from "@nativescript/core/ui/switch";
+import { DatePicker } from "@nativescript/core/ui/date-picker";
+import { TimePicker } from "@nativescript/core/ui/time-picker";
+import { ListPicker } from "@nativescript/core/ui/list-picker";
+import { TextField } from "@nativescript/core/ui/text-field";
import {
NumberValueAccessor,
CheckedValueAccessor,
@@ -14,7 +14,7 @@ import {
TimeValueAccessor,
SelectedIndexValueAccessor,
TextValueAccessor
-} from "nativescript-angular/forms/value-accessors";
+} from "@nativescript/angular/forms/value-accessors";
import { ElementRef } from "@angular/core";
class TestElementRef implements ElementRef {
diff --git a/tests/app/tests/xhr-paths.ts b/tests/app/tests/xhr-paths.ts
index c3de6a6dc..1abe2e970 100644
--- a/tests/app/tests/xhr-paths.ts
+++ b/tests/app/tests/xhr-paths.ts
@@ -1,9 +1,9 @@
// make sure you import mocha-config before @angular/core
import { assert } from "./test-config";
-import { FileSystemResourceLoader } from "nativescript-angular/resource-loader";
+import { FileSystemResourceLoader } from "@nativescript/angular/resource-loader";
-import { File } from "tns-core-modules/file-system";
-import { NSFileSystem } from "nativescript-angular/file-system/ns-file-system";
+import { File } from "@nativescript/core/file-system";
+import { NSFileSystem } from "@nativescript/angular/file-system/ns-file-system";
class NSFileSystemMock {
public currentApp(): any {
diff --git a/tests/package.json b/tests/package.json
index 38882a76f..d62b5476d 100644
--- a/tests/package.json
+++ b/tests/package.json
@@ -19,19 +19,19 @@
],
"homepage": "http://nativescript.org",
"dependencies": {
- "@angular/animations": "~8.2.0",
- "@angular/common": "~8.2.0",
- "@angular/compiler": "~8.2.0",
- "@angular/core": "~8.2.0",
- "@angular/forms": "~8.2.0",
- "@angular/platform-browser": "~8.2.0",
- "@angular/platform-browser-dynamic": "~8.2.0",
- "@angular/router": "~8.2.0",
+ "@angular/animations": "~9.1.0",
+ "@angular/common": "~9.1.0",
+ "@angular/compiler": "~9.1.0",
+ "@angular/core": "~9.1.0",
+ "@angular/forms": "~9.1.0",
+ "@angular/platform-browser": "~9.1.0",
+ "@angular/platform-browser-dynamic": "~9.1.0",
+ "@angular/router": "~9.1.0",
"nativescript-angular": "../nativescript-angular-package",
"nativescript-unit-test-runner": "0.7.0",
- "rxjs": "^6.4.0",
- "tns-core-modules": "next",
- "zone.js": "^0.9.1"
+ "rxjs": "~6.5.5",
+ "@nativescript/core": "next",
+ "zone.js": "^0.10.3"
},
"devDependencies": {
"@angular/compiler-cli": "8.0.0",
@@ -57,7 +57,7 @@
"remove-strict-webpack-plugin": "~0.1.2",
"sinon": "^7.3.2",
"tslint": "^4.5.1",
- "typescript": "~3.5.3"
+ "typescript": "~3.8.3"
},
"scripts": {
"e2e": "tsc -p e2e && mocha --opts ../e2e/config/mocha.opts --recursive e2e --appiumCapsLocation ../e2e/config/appium.capabilities.json",
diff --git a/tests/tsconfig.json b/tests/tsconfig.json
index 730d1b343..a1a395125 100644
--- a/tests/tsconfig.json
+++ b/tests/tsconfig.json
@@ -6,10 +6,11 @@
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
+ "skipLibCheck": true,
"lib": [
- "es6",
+ "es2017",
"dom",
- "es2015.iterable"
+ "es6"
],
"baseUrl": ".",
"paths": {