diff --git a/nativescript-angular/tsconfig.typedoc.json b/nativescript-angular/tsconfig.typedoc.json index 3074c04b8..e6cbd184d 100644 --- a/nativescript-angular/tsconfig.typedoc.json +++ b/nativescript-angular/tsconfig.typedoc.json @@ -53,7 +53,6 @@ "./router/private-imports", "./schema-registry.ts", "./http-client/index.ts", - "./http/index.ts", "./router/index.ts", "" diff --git a/ng-sample/app/app.ts b/ng-sample/app/app.ts index bf72639af..86b2aaad2 100644 --- a/ng-sample/app/app.ts +++ b/ng-sample/app/app.ts @@ -7,7 +7,6 @@ import { DOCUMENT } from "@angular/common"; import { Router } from "@angular/router"; import { NativeScriptRouterModule } from "nativescript-angular/router"; import { NativeScriptFormsModule } from "nativescript-angular/forms"; -import { NativeScriptHttpModule } from "nativescript-angular/http"; import { NativeScriptHttpClientModule } from "nativescript-angular/http-client"; import { @@ -42,7 +41,6 @@ import { ListTest } from "./examples/list/list-test"; import { ListTemplateSelectorTest } from "./examples/list/template-selector"; import { ListTestAsync, ListTestFilterAsync } from "./examples/list/list-test-async"; import { ImageTest } from "./examples/image/image-test"; -import { HttpTest } from "./examples/http/http-test"; import { HttpClientTest } from "./examples/http-client/http-client-test"; import { ActionBarTest } from "./examples/action-bar/action-bar-test"; import { PlatfromDirectivesTest } from "./examples/platform-directives/platform-directives-test"; @@ -73,14 +71,12 @@ import { AnimationStatesMultiTest } from "./examples/animation/animation-states- imports: [ NativeScriptModule, NativeScriptFormsModule, - NativeScriptHttpModule, NativeScriptHttpClientModule, NativeScriptRouterModule, ], exports: [ NativeScriptModule, NativeScriptFormsModule, - NativeScriptHttpModule, NativeScriptHttpClientModule, NativeScriptRouterModule, ], @@ -146,7 +142,6 @@ class MyErrorHandler implements ErrorHandler { platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ListTestAsync)); // platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ImageTest)); // platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ModalTest)); -// platformNativeScriptDynamic().bootstrapModule(makeExampleModule(HttpTest)); // platformNativeScriptDynamic().bootstrapModule(makeExampleModule(HttpClientTest)); // platformNativeScriptDynamic().bootstrapModule(makeExampleModule(PlatfromDirectivesTest)); // platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ActionBarTest)); diff --git a/ng-sample/app/examples/http-client/http-client-test.ts b/ng-sample/app/examples/http-client/http-client-test.ts index ed6f784d3..dc0282ced 100644 --- a/ng-sample/app/examples/http-client/http-client-test.ts +++ b/ng-sample/app/examples/http-client/http-client-test.ts @@ -70,7 +70,7 @@ export class HttpClientTest { } public loadLocal() { - this.http.get>("~/examples/http/data.json") + this.http.get>("~/examples/http-client/data.json") .subscribe((response) => { let user = response.results[0]; this.onSuccess(user.title, user.description); diff --git a/ng-sample/app/examples/http/data.json b/ng-sample/app/examples/http/data.json deleted file mode 100644 index 52d4169d4..000000000 --- a/ng-sample/app/examples/http/data.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "results": [ - { - "title": "Test", - "description": "Testing Http local and remote." - } - ] -} diff --git a/ng-sample/app/examples/http/http-test.ts b/ng-sample/app/examples/http/http-test.ts deleted file mode 100644 index 15e84c70b..000000000 --- a/ng-sample/app/examples/http/http-test.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Component } from "@angular/core"; -import { Http } from "@angular/http"; -import { map } from "rxjs/operators"; - -/* IMPORTANT -In order to test out the full image example, -to fix the App Transport Security error in iOS 9, -you will need to follow this after adding the iOS platform: - -https://blog.nraboy.com/2015/12/fix-ios-9-app-transport-security-issues-in-nativescript/ -*/ - -@Component({ - selector: "http-test", - template: ` - - - - - - - `, - styles: [ - `Button { - margin-bottom:20; - }` - ], -}) -export class HttpTest { - public title: string; - public description: string; - - constructor(private http: Http) { - - } - - public loadLocal() { - this.http.get("~/examples/http/data.json").pipe( - map(res => res.json()) - ).subscribe((response: any) => { - let user = response.results[0]; - this.title = user.title; - this.description = user.description; - }); - } - - public loadRemote() { - this.http.get(`https://randomuser.me/api/?results=1&nat=us`) - .pipe(map(res => res.json())) - .subscribe((response: any) => { - let user = response.results[0]; - this.title = user.name.first; - this.description = user.email; - }); - } -} diff --git a/ng-sample/app/examples/list/list-test-async.ts b/ng-sample/app/examples/list/list-test-async.ts index 20206a2d1..b4a8a7215 100644 --- a/ng-sample/app/examples/list/list-test-async.ts +++ b/ng-sample/app/examples/list/list-test-async.ts @@ -5,7 +5,7 @@ import { combineLatest } from "rxjs/operators"; @Component({ selector: "list-test-async", - styleUrls: ["examples/list/styles.css"], + styleUrls: ["./styles.css"], providers: [DataService], changeDetection: ChangeDetectionStrategy.OnPush, template: ` @@ -58,7 +58,7 @@ export class ListTestAsync { @Component({ selector: "list-test-async-filter", - styleUrls: ["examples/list/styles.css"], + styleUrls: ["./styles.css"], providers: [DataService], changeDetection: ChangeDetectionStrategy.OnPush, template: ` diff --git a/ng-sample/app/examples/list/list-test.ts b/ng-sample/app/examples/list/list-test.ts index 0a93bd4ad..db2cfe257 100644 --- a/ng-sample/app/examples/list/list-test.ts +++ b/ng-sample/app/examples/list/list-test.ts @@ -8,7 +8,7 @@ class DataItem { @Component({ selector: "item-component", - styleUrls: ["examples/list/styles.css"], + styleUrls: ["./styles.css"], changeDetection: ChangeDetectionStrategy.OnPush, template: ` @@ -35,7 +35,7 @@ export class ItemComponent implements AfterViewChecked, DoCheck { @Component({ selector: "list-test", - styleUrls: ["examples/list/styles.css"], + styleUrls: ["./styles.css"], changeDetection: ChangeDetectionStrategy.OnPush, template: ` diff --git a/ng-sample/app/examples/list/template-selector.ts b/ng-sample/app/examples/list/template-selector.ts index 54c11b28e..3cd9ec38f 100644 --- a/ng-sample/app/examples/list/template-selector.ts +++ b/ng-sample/app/examples/list/template-selector.ts @@ -10,7 +10,7 @@ class DataItem { @Component({ selector: "item-component", - styleUrls: ["examples/list/styles.css"], + styleUrls: ["./styles.css"], changeDetection: ChangeDetectionStrategy.OnPush, template: `` }) @@ -21,7 +21,7 @@ export class ItemComponent implements DoCheck { @Component({ selector: "header-component", - styleUrls: ["examples/list/styles.css"], + styleUrls: ["./styles.css"], changeDetection: ChangeDetectionStrategy.OnPush, template: `` }) @@ -32,7 +32,7 @@ export class HeaderComponent implements DoCheck { @Component({ selector: "list-test", - styleUrls: ["examples/list/styles.css"], + styleUrls: ["./styles.css"], changeDetection: ChangeDetectionStrategy.OnPush, template: ` diff --git a/ng-sample/app/examples/router/page-router-outlet-test.ts b/ng-sample/app/examples/router/page-router-outlet-test.ts index 84c6f3606..ed30a8c67 100644 --- a/ng-sample/app/examples/router/page-router-outlet-test.ts +++ b/ng-sample/app/examples/router/page-router-outlet-test.ts @@ -7,7 +7,7 @@ import { map } from "rxjs/operators"; @Component({ selector: "first", - styleUrls: ["examples/router/styles.css"], + styleUrls: ["./styles.css"], template: ` @@ -34,7 +34,7 @@ export class FirstComponent implements OnInit, OnDestroy { @Component({ selector: "second", - styleUrls: ["examples/router/styles.css"], + styleUrls: ["./styles.css"], template: ` @@ -68,7 +68,7 @@ export class SecondComponent implements OnInit, OnDestroy { @Component({ selector: "third", - styleUrls: ["examples/router/styles.css"], + styleUrls: ["./styles.css"], template: ` diff --git a/ng-sample/package.json b/ng-sample/package.json index 18cf74409..8dbf3d5ae 100644 --- a/ng-sample/package.json +++ b/ng-sample/package.json @@ -41,12 +41,14 @@ "zone.js": "^0.9.1" }, "devDependencies": { + "@angular/compiler-cli": "~8.2.0", + "@ngtools/webpack": "~8.2.0", "babel-traverse": "6.9.0", "babel-types": "6.10.0", "babylon": "6.8.1", "filewalker": "0.1.2", "lazy": "1.0.11", - "nativescript-dev-typescript": "next", + "nativescript-dev-webpack": "~1.0.1", "shelljs": "^0.7.0", "tslint": "^4.5.1", "typescript": "~3.5.3" diff --git a/ng-sample/tsconfig.json b/ng-sample/tsconfig.json index 4f07c2af2..b73d56d49 100644 --- a/ng-sample/tsconfig.json +++ b/ng-sample/tsconfig.json @@ -20,10 +20,19 @@ "*": [ "./node_modules/tns-core-modules/*", "./node_modules/*" + ], + "~/*": [ + "app/*" ] }, }, + "include": [ + "../nativescript-angular", + "**/*" + ], "exclude": [ + "../nativescript-angular/node_modules", + "../nativescript-angular/**/*.d.ts", "node_modules", "platforms" ]