Skip to content

Commit ca53755

Browse files
committed
chore: tooling
1 parent 0c29b8b commit ca53755

26 files changed

+220
-130
lines changed

apps/demo-angular/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
"@nativescript/zip": "file:../../dist/packages/zip"
3030
},
3131
"devDependencies": {
32+
"@angular/compiler-cli": "file:../../node_modules/@angular/compiler-cli",
3233
"@nativescript/android": "~7.0.0",
33-
"@nativescript/ios": "~7.0.0",
34+
"@nativescript/ios": "7.0.0",
3435
"@nativescript/webpack": "~3.0.0",
35-
"typescript": "file:../../node_modules/typescript",
36-
"@angular/compiler-cli": "file:../../node_modules/@angular/compiler-cli",
37-
"@ngtools/webpack": "file:../../node_modules/@ngtools/webpack"
36+
"@ngtools/webpack": "file:../../node_modules/@ngtools/webpack",
37+
"typescript": "file:../../node_modules/typescript"
3838
}
3939
}

apps/demo-angular/src/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { Routes } from "@angular/router";
33
import { NativeScriptRouterModule } from "@nativescript/angular";
44

55
import { HomeComponent } from "./home.component";
6-
import { ImagePickerComponent, DateTimePickerComponent } from "./plugin-demos";
76

87
const routes: Routes = [
98
{ path: "", redirectTo: "/home", pathMatch: "full" },
109
{ path: "home", component: HomeComponent },
11-
{ path: "datetimepicker", component: DateTimePickerComponent },
12-
{ path: "imagepicker", component: ImagePickerComponent }
10+
{ path: "datetimepicker", loadChildren: () => import('./plugin-demos/datetimepicker.module').then(m => m.DateTimePickerModule) },
11+
{ path: "imagepicker", loadChildren: () => import('./plugin-demos/imagepicker.module').then(m => m.ImagePickerModule) },
12+
{ path: "appavailability", loadChildren: () => import('./plugin-demos/appavailability.module').then(m => m.AppavailabilityModule) }
1313
];
1414

1515
@NgModule({

apps/demo-angular/src/app.component.html

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Component } from "@angular/core";
1+
import { Component } from '@angular/core';
22

33
@Component({
4-
selector: "demo-app",
5-
templateUrl: "app.component.html",
4+
selector: 'demo-app',
5+
template: `<GridLayout>
6+
<page-router-outlet></page-router-outlet>
7+
</GridLayout>`,
68
})
7-
export class AppComponent {
8-
9-
}
9+
export class AppComponent {}

apps/demo-angular/src/app.module.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import { NativeScriptModule } from "@nativescript/angular";
44
import { AppComponent } from "./app.component";
55
import { AppRoutingModule } from "./app-routing.module";
66
import { HomeComponent } from "./home.component";
7-
import { COMPONENTS } from "./plugin-demos";
8-
import { NativeScriptDateTimePickerModule } from "@nativescript/datetimepicker/angular";
97

108
@NgModule({
119
schemas: [NO_ERRORS_SCHEMA],
12-
declarations: [AppComponent, HomeComponent, ...COMPONENTS],
10+
declarations: [AppComponent, HomeComponent],
1311
bootstrap: [AppComponent],
14-
imports: [NativeScriptModule, AppRoutingModule, NativeScriptDateTimePickerModule],
12+
imports: [NativeScriptModule, AppRoutingModule],
1513
})
1614
export class AppModule {}

apps/demo-angular/src/home.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<ActionBar>
2+
<ActionBar title="Demos"></ActionBar>
3+
</ActionBar>
14
<GridLayout>
25
<ListView [items]="demos">
36
<ng-template let-item="item" let-i="index">

apps/demo-angular/src/home.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export class HomeComponent {
1111
},
1212
{
1313
name: 'imagepicker',
14+
},
15+
{
16+
name: 'appavailability',
1417
},
1518
];
1619
}

apps/demo-angular/src/plugin-demos/appavailability.component.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<ActionBar>
2+
<ActionBar title="appavailability"></ActionBar>
3+
</ActionBar>
14
<StackLayout class="p-20">
25
<ScrollView class="h-full">
36
<StackLayout>
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import { Component, NgZone } from '@angular/core';
2-
import { } from '@nativescript/appavailability';
2+
import {} from '@nativescript/appavailability';
33

44
@Component({
55
selector: 'demo-appavailability',
66
templateUrl: 'appavailability.component.html',
77
})
88
export class AppavailabilityComponent {
9+
constructor(private ngZone: NgZone) {}
910

10-
constructor(private _ngZone: NgZone) {}
11-
12-
testIt() {
13-
// test something here
14-
}
15-
11+
testIt() {
12+
console.log('test your plugin!');
13+
}
1614
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { AppavailabilityComponent } from './appavailability.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: AppavailabilityComponent }])],
7+
declarations: [AppavailabilityComponent],
8+
schemas: [ NO_ERRORS_SCHEMA]
9+
})
10+
export class AppavailabilityModule {}

0 commit comments

Comments
 (0)