Skip to content

Commit ed0d916

Browse files
committed
chore(e2e): update router app to webpack 4 and NG 6
1 parent 53d6ea1 commit ed0d916

File tree

11 files changed

+31
-44
lines changed

11 files changed

+31
-44
lines changed

e2e/router/app/app.module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { NgModule, NgModuleFactoryLoader, NO_ERRORS_SCHEMA } from "@angular/core
22
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
33
import { NSModuleFactoryLoader } from "nativescript-angular/router";
44

5-
import "./rxjs-operators";
6-
75
import {
86
AppRoutingModule,
97
navigatableComponents,

e2e/router/app/first/first.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Location } from "@angular/common";
44
import { RouterExtensions } from "nativescript-angular/router";
55

66
import { Page } from "ui/page";
7-
import { Observable } from "rxjs/Observable";
87

98
@Component({
109
selector: "first",

e2e/router/app/lazy/lazy-componentless-route.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Location } from "@angular/common";
44
import { RouterExtensions } from "nativescript-angular/router";
55

66
import { Page } from "ui/page";
7-
import { Observable } from "rxjs/Observable";
87

98
@Component({
109
selector: "lazy",

e2e/router/app/lazy/lazy.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Location } from "@angular/common";
44
import { RouterExtensions } from "nativescript-angular/router";
55

66
import { Page } from "ui/page";
7-
import { Observable } from "rxjs/Observable";
87

98
@Component({
109
selector: "lazy",

e2e/router/app/rxjs-operators.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

e2e/router/app/second/detail.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Component, OnInit, OnDestroy } from "@angular/core";
22
import { ActivatedRoute, Router, Route } from "@angular/router";
33
import { Location } from "@angular/common";
44
import { Page } from "ui/page";
5-
import { Observable } from "rxjs/Observable";
5+
import { Observable } from "rxjs";
6+
import { map } from "rxjs/operators";
67

78
@Component({
89
selector: "detail",
@@ -19,7 +20,7 @@ export class DetailComponent {
1920

2021
constructor(private router: Router, private route: ActivatedRoute) {
2122
console.log("DetailComponent - constructor()");
22-
this.id$ = route.params.map(r => r["id"]);
23+
this.id$ = route.params.pipe(map(r => r["id"]));
2324
}
2425

2526
ngOnInit() {
@@ -29,4 +30,4 @@ export class DetailComponent {
2930
ngOnDestroy() {
3031
console.log("DetailComponent - ngOnDestroy()");
3132
}
32-
}
33+
}

e2e/router/app/second/second.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { ActivatedRoute, Router, Route } from "@angular/router";
33

44
import { RouterExtensions } from "nativescript-angular/router";
55
import { Page } from "ui/page";
6-
import { Observable } from "rxjs/Observable";
6+
import { Observable } from "rxjs";
7+
import { map } from "rxjs/operators";
78

89
@Component({
910
selector: "second",
@@ -28,8 +29,8 @@ export class SecondComponent implements OnInit, OnDestroy {
2829

2930
constructor(private routerExt: RouterExtensions, route: ActivatedRoute, page: Page) {
3031
console.log("SecondComponent - constructor() page: " + page);
31-
this.depth$ = route.params.map(r => r["depth"]);
32-
this.nextDepth$ = route.params.map(r => +r["depth"] + 1);
32+
this.depth$ = route.params.pipe(map(r => r["depth"]));
33+
this.nextDepth$ = route.params.pipe(map(r => +r["depth"] + 1));
3334
}
3435

3536
ngOnInit() {
@@ -43,4 +44,4 @@ export class SecondComponent implements OnInit, OnDestroy {
4344
goBack() {
4445
this.routerExt.back();
4546
}
46-
}
47+
}

e2e/router/app/vendor-platform.android.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

e2e/router/app/vendor-platform.ios.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

e2e/router/app/vendor.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ const appCssContext = require.context("~/", false, /^\.\/app\.(css|scss|less|sas
55
global.registerWebpackModules(appCssContext);
66
application.loadAppCss();
77

8-
require("./vendor-platform");
9-
108
require("reflect-metadata");
119
require("@angular/platform-browser");
1210
require("@angular/core");

0 commit comments

Comments
 (0)