From 1af7f8142f6734d13f7471144093e93715f042fd Mon Sep 17 00:00:00 2001 From: Teodor Bozhikov Date: Thu, 22 Mar 2018 17:34:11 +0200 Subject: [PATCH 01/20] refactor: use viewModel and bindings in demo --- demo/app/main-page.ts | 48 +++--------------------- demo/app/main-page.xml | 8 ++-- demo/app/main-view-model.ts | 74 +++++++++++++++++++++++++++++++++++++ demo/package.json | 3 +- 4 files changed, 85 insertions(+), 48 deletions(-) create mode 100644 demo/app/main-view-model.ts diff --git a/demo/app/main-page.ts b/demo/app/main-page.ts index 8199a20..f78cf95 100644 --- a/demo/app/main-page.ts +++ b/demo/app/main-page.ts @@ -1,50 +1,12 @@ import { EventData } from 'tns-core-modules/data/observable'; import { Page } from 'tns-core-modules/ui/page'; -import { isAndroid } from "tns-core-modules/platform"; -import * as imagepicker from "nativescript-imagepicker"; +import { MainViewModel } from './main-view-model'; -let list; -let imageSrc; +let viewModel; export function pageLoaded(args: EventData) { - let page = args.object; - list = page.getViewById("urls-list"); - imageSrc = page.getViewById("imageSrc"); -} - -export function onSelectMultipleTap(args) { - let context = imagepicker.create({ mode: "multiple" }); - startSelection(context, false); -} + viewModel = viewModel || new MainViewModel(); -export function onSelectSingleTap(args) { - let context = imagepicker.create({ mode: "single" }); - startSelection(context, true); -} - -function startSelection(context, isSingle) { - context - .authorize() - .then(function() { - list.items = []; - return context.present(); - }) - .then(function(selection) { - console.log("Selection done:"); - selection.forEach(function(selected) { - console.log("----------------"); - console.log("uri: " + selected.uri); - if (isSingle) { - selected.getImage({ maxWidth: 200, maxHeight: 200, aspectRatio: 'fill' }) - .then((imageSource) => { - imageSrc.src = imageSource; - }); - } else { - imageSrc.visibility = 'hidden'; - } - }); - list.items = selection; - }).catch(function (e) { - console.log(e); - }); + let page = args.object; + page.bindingContext = viewModel; } \ No newline at end of file diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index 41d50bb..861f5b7 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -3,7 +3,7 @@ - + @@ -13,8 +13,8 @@ - - \ No newline at end of file diff --git a/demo-angular/app/app.component.ts b/demo-angular/app/app.component.ts index b35dd6f..9f9676e 100644 --- a/demo-angular/app/app.component.ts +++ b/demo-angular/app/app.component.ts @@ -8,44 +8,54 @@ import * as imagepicker from "nativescript-imagepicker"; templateUrl: "app.component.html", }) export class AppComponent { - - items = []; + imageAssets = []; + imageSrc: any; + isSingleMode: boolean = true; + thumbSize: number = 80; + previewSize: number = 300; constructor(private _changeDetectionRef: ChangeDetectorRef) { } - onSelectMultipleTap() { + public onSelectMultipleTap() { + this.isSingleMode = false; + let context = imagepicker.create({ mode: "multiple" }); this.startSelection(context); } - onSelectSingleTap() { + public onSelectSingleTap() { + this.isSingleMode = true; + let context = imagepicker.create({ mode: "single" }); this.startSelection(context); } - startSelection(context) { - let _that = this; + private startSelection(context) { + let that = this; context .authorize() .then(() => { - _that.items = []; + that.imageAssets = []; + that.imageSrc = null; return context.present(); }) .then((selection) => { - console.log("Selection done:"); - selection.forEach(function (selected) { - console.log("----------------"); - console.log("uri: " + selected.uri); - console.log("fileUri: " + selected.fileUri); + console.log("Selection done: " + JSON.stringify(selection)); + that.imageSrc = that.isSingleMode && selection.length > 0 ? selection[0] : null; + + // set the images to be loaded from the assets with optimal sizes (optimize memory usage) + selection.forEach(function (element) { + element.options.width = that.isSingleMode ? that.previewSize : that.thumbSize; + element.options.height = that.isSingleMode ? that.previewSize : that.thumbSize; }); - _that.items = selection; - _that._changeDetectionRef.detectChanges(); + + that.imageAssets = selection; }).catch(function (e) { console.log(e); }); diff --git a/demo-angular/package.json b/demo-angular/package.json index 1eb9e13..c60dc67 100644 --- a/demo-angular/package.json +++ b/demo-angular/package.json @@ -52,7 +52,8 @@ "webpack": "~3.8.1", "webpack-bundle-analyzer": "^2.8.2", "webpack-sources": "~1.0.1", - "zone.js": "^0.8.4" + "zone.js": "^0.8.4", + "uglifyjs-webpack-plugin": "~1.1.6" }, "scripts": { "build.plugin": "cd ../src && npm run build", diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index ad76e5f..106882a 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -5,8 +5,8 @@ - - + + diff --git a/demo/app/main-view-model.ts b/demo/app/main-view-model.ts index 7f62734..42d5b36 100644 --- a/demo/app/main-view-model.ts +++ b/demo/app/main-view-model.ts @@ -1,5 +1,4 @@ import { Observable } from 'tns-core-modules/data/observable'; -import { isAndroid } from "tns-core-modules/platform"; import * as imagepicker from "nativescript-imagepicker"; export class MainViewModel extends Observable { diff --git a/src/typings/objc!QBImagePickerController.d.ts b/src/typings/objc!QBImagePickerController.d.ts index e79143d..c51fc83 100644 --- a/src/typings/objc!QBImagePickerController.d.ts +++ b/src/typings/objc!QBImagePickerController.d.ts @@ -1,153 +1,151 @@ - declare class QBAlbumCell extends UITableViewCell { + static alloc(): QBAlbumCell; // inherited from NSObject - static alloc(): QBAlbumCell; // inherited from NSObject - - static appearance(): QBAlbumCell; // inherited from UIAppearance + static appearance(): QBAlbumCell; // inherited from UIAppearance - static appearanceForTraitCollection(trait: UITraitCollection): QBAlbumCell; // inherited from UIAppearance + static appearanceForTraitCollection(trait: UITraitCollection): QBAlbumCell; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBAlbumCell; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBAlbumCell; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBAlbumCell; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBAlbumCell; // inherited from UIAppearance - static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBAlbumCell; // inherited from UIAppearance + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBAlbumCell; // inherited from UIAppearance - static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBAlbumCell; // inherited from UIAppearance + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBAlbumCell; // inherited from UIAppearance - static new(): QBAlbumCell; // inherited from NSObject + static new(): QBAlbumCell; // inherited from NSObject - borderWidth: number; + borderWidth: number; - countLabel: UILabel; + countLabel: UILabel; - imageView1: UIImageView; + imageView1: UIImageView; - imageView2: UIImageView; + imageView2: UIImageView; - imageView3: UIImageView; + imageView3: UIImageView; - titleLabel: UILabel; + titleLabel: UILabel; } declare class QBAlbumsViewController extends UITableViewController { - static alloc(): QBAlbumsViewController; // inherited from NSObject + static alloc(): QBAlbumsViewController; // inherited from NSObject - static new(): QBAlbumsViewController; // inherited from NSObject + static new(): QBAlbumsViewController; // inherited from NSObject - imagePickerController: QBImagePickerController; + imagePickerController: QBImagePickerController; } declare class QBAssetCell extends UICollectionViewCell { - static alloc(): QBAssetCell; // inherited from NSObject + static alloc(): QBAssetCell; // inherited from NSObject - static appearance(): QBAssetCell; // inherited from UIAppearance + static appearance(): QBAssetCell; // inherited from UIAppearance - static appearanceForTraitCollection(trait: UITraitCollection): QBAssetCell; // inherited from UIAppearance + static appearanceForTraitCollection(trait: UITraitCollection): QBAssetCell; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBAssetCell; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBAssetCell; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBAssetCell; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBAssetCell; // inherited from UIAppearance - static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBAssetCell; // inherited from UIAppearance + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBAssetCell; // inherited from UIAppearance - static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBAssetCell; // inherited from UIAppearance + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBAssetCell; // inherited from UIAppearance - static new(): QBAssetCell; // inherited from NSObject + static new(): QBAssetCell; // inherited from NSObject - imageView: UIImageView; + imageView: UIImageView; - showsOverlayViewWhenSelected: boolean; + showsOverlayViewWhenSelected: boolean; - videoIndicatorView: QBVideoIndicatorView; + videoIndicatorView: QBVideoIndicatorView; } declare class QBAssetsViewController extends UICollectionViewController { - static alloc(): QBAssetsViewController; // inherited from NSObject + static alloc(): QBAssetsViewController; // inherited from NSObject - static new(): QBAssetsViewController; // inherited from NSObject + static new(): QBAssetsViewController; // inherited from NSObject - assetCollection: PHAssetCollection; + assetCollection: PHAssetCollection; - imagePickerController: QBImagePickerController; + imagePickerController: QBImagePickerController; } declare class QBCheckmarkView extends UIView { - static alloc(): QBCheckmarkView; // inherited from NSObject + static alloc(): QBCheckmarkView; // inherited from NSObject - static appearance(): QBCheckmarkView; // inherited from UIAppearance + static appearance(): QBCheckmarkView; // inherited from UIAppearance - static appearanceForTraitCollection(trait: UITraitCollection): QBCheckmarkView; // inherited from UIAppearance + static appearanceForTraitCollection(trait: UITraitCollection): QBCheckmarkView; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBCheckmarkView; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBCheckmarkView; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBCheckmarkView; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBCheckmarkView; // inherited from UIAppearance - static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBCheckmarkView; // inherited from UIAppearance + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBCheckmarkView; // inherited from UIAppearance - static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBCheckmarkView; // inherited from UIAppearance + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBCheckmarkView; // inherited from UIAppearance - static new(): QBCheckmarkView; // inherited from NSObject + static new(): QBCheckmarkView; // inherited from NSObject - bodyColor: UIColor; + bodyColor: UIColor; - borderColor: UIColor; + borderColor: UIColor; - borderWidth: number; + borderWidth: number; - checkmarkColor: UIColor; + checkmarkColor: UIColor; - checkmarkLineWidth: number; + checkmarkLineWidth: number; } declare class QBImagePickerController extends UIViewController { - static alloc(): QBImagePickerController; // inherited from NSObject + static alloc(): QBImagePickerController; // inherited from NSObject - static new(): QBImagePickerController; // inherited from NSObject + static new(): QBImagePickerController; // inherited from NSObject - allowsMultipleSelection: boolean; + allowsMultipleSelection: boolean; - assetCollectionSubtypes: NSArray; + assetCollectionSubtypes: NSArray; - delegate: QBImagePickerControllerDelegate; + delegate: QBImagePickerControllerDelegate; - maximumNumberOfSelection: number; + maximumNumberOfSelection: number; - mediaType: QBImagePickerMediaType; + mediaType: QBImagePickerMediaType; - minimumNumberOfSelection: number; + minimumNumberOfSelection: number; - numberOfColumnsInLandscape: number; + numberOfColumnsInLandscape: number; - numberOfColumnsInPortrait: number; + numberOfColumnsInPortrait: number; - prompt: string; + prompt: string; - readonly selectedAssets: NSMutableOrderedSet; + readonly selectedAssets: NSMutableOrderedSet; - showsNumberOfSelectedAssets: boolean; + showsNumberOfSelectedAssets: boolean; } interface QBImagePickerControllerDelegate extends NSObjectProtocol { - qb_imagePickerControllerDidCancel?(imagePickerController: QBImagePickerController): void; + qb_imagePickerControllerDidCancel?(imagePickerController: QBImagePickerController): void; - qb_imagePickerControllerDidDeselectAsset?(imagePickerController: QBImagePickerController, asset: PHAsset): void; + qb_imagePickerControllerDidDeselectAsset?(imagePickerController: QBImagePickerController, asset: PHAsset): void; - qb_imagePickerControllerDidFinishPickingAssets?(imagePickerController: QBImagePickerController, assets: NSArray): void; + qb_imagePickerControllerDidFinishPickingAssets?(imagePickerController: QBImagePickerController, assets: NSArray): void; - qb_imagePickerControllerDidSelectAsset?(imagePickerController: QBImagePickerController, asset: PHAsset): void; + qb_imagePickerControllerDidSelectAsset?(imagePickerController: QBImagePickerController, asset: PHAsset): void; - qb_imagePickerControllerShouldSelectAsset?(imagePickerController: QBImagePickerController, asset: PHAsset): boolean; + qb_imagePickerControllerShouldSelectAsset?(imagePickerController: QBImagePickerController, asset: PHAsset): boolean; } declare var QBImagePickerControllerDelegate: { - prototype: QBImagePickerControllerDelegate; + prototype: QBImagePickerControllerDelegate; }; declare var QBImagePickerControllerVersionNumber: number; @@ -156,76 +154,76 @@ declare var QBImagePickerControllerVersionString: interop.Reference; declare const enum QBImagePickerMediaType { - Any = 0, + Any = 0, - Image = 1, + Image = 1, - Video = 2 + Video = 2 } declare class QBSlomoIconView extends UIView { - static alloc(): QBSlomoIconView; // inherited from NSObject + static alloc(): QBSlomoIconView; // inherited from NSObject - static appearance(): QBSlomoIconView; // inherited from UIAppearance + static appearance(): QBSlomoIconView; // inherited from UIAppearance - static appearanceForTraitCollection(trait: UITraitCollection): QBSlomoIconView; // inherited from UIAppearance + static appearanceForTraitCollection(trait: UITraitCollection): QBSlomoIconView; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBSlomoIconView; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBSlomoIconView; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBSlomoIconView; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBSlomoIconView; // inherited from UIAppearance - static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBSlomoIconView; // inherited from UIAppearance + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBSlomoIconView; // inherited from UIAppearance - static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBSlomoIconView; // inherited from UIAppearance + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBSlomoIconView; // inherited from UIAppearance - static new(): QBSlomoIconView; // inherited from NSObject + static new(): QBSlomoIconView; // inherited from NSObject - iconColor: UIColor; + iconColor: UIColor; } declare class QBVideoIconView extends UIView { - static alloc(): QBVideoIconView; // inherited from NSObject + static alloc(): QBVideoIconView; // inherited from NSObject - static appearance(): QBVideoIconView; // inherited from UIAppearance + static appearance(): QBVideoIconView; // inherited from UIAppearance - static appearanceForTraitCollection(trait: UITraitCollection): QBVideoIconView; // inherited from UIAppearance + static appearanceForTraitCollection(trait: UITraitCollection): QBVideoIconView; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBVideoIconView; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBVideoIconView; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBVideoIconView; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBVideoIconView; // inherited from UIAppearance - static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBVideoIconView; // inherited from UIAppearance + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBVideoIconView; // inherited from UIAppearance - static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBVideoIconView; // inherited from UIAppearance + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBVideoIconView; // inherited from UIAppearance - static new(): QBVideoIconView; // inherited from NSObject + static new(): QBVideoIconView; // inherited from NSObject - iconColor: UIColor; + iconColor: UIColor; } declare class QBVideoIndicatorView extends UIView { - static alloc(): QBVideoIndicatorView; // inherited from NSObject + static alloc(): QBVideoIndicatorView; // inherited from NSObject - static appearance(): QBVideoIndicatorView; // inherited from UIAppearance + static appearance(): QBVideoIndicatorView; // inherited from UIAppearance - static appearanceForTraitCollection(trait: UITraitCollection): QBVideoIndicatorView; // inherited from UIAppearance + static appearanceForTraitCollection(trait: UITraitCollection): QBVideoIndicatorView; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBVideoIndicatorView; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): QBVideoIndicatorView; // inherited from UIAppearance - static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBVideoIndicatorView; // inherited from UIAppearance + static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray): QBVideoIndicatorView; // inherited from UIAppearance - static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBVideoIndicatorView; // inherited from UIAppearance + static appearanceWhenContainedIn(ContainerClass: typeof NSObject): QBVideoIndicatorView; // inherited from UIAppearance - static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBVideoIndicatorView; // inherited from UIAppearance + static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray): QBVideoIndicatorView; // inherited from UIAppearance - static new(): QBVideoIndicatorView; // inherited from NSObject + static new(): QBVideoIndicatorView; // inherited from NSObject - slomoIcon: QBSlomoIconView; + slomoIcon: QBSlomoIconView; - timeLabel: UILabel; + timeLabel: UILabel; - videoIcon: QBVideoIconView; + videoIcon: QBVideoIconView; } From 86e7ac8259ba6a899c9866917a0af7f65a112ef2 Mon Sep 17 00:00:00 2001 From: Teodor Bozhikov Date: Tue, 10 Apr 2018 17:57:26 +0300 Subject: [PATCH 14/20] fix: remove BSImagePicker reference --- src/references.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/references.d.ts b/src/references.d.ts index f2bfebf..0d40032 100644 --- a/src/references.d.ts +++ b/src/references.d.ts @@ -1,4 +1,3 @@ /// /// -/// -/// +/// \ No newline at end of file From 4992d660bcfb3d33ad0f96d4e45170d79bea1fc0 Mon Sep 17 00:00:00 2001 From: Zdravko Branzov Date: Wed, 11 Apr 2018 17:40:59 +0300 Subject: [PATCH 15/20] fix: UI tests and bump modules and runtime version. --- demo-angular/app/app.component.html | 4 ++-- demo-angular/app/app.component.ts | 7 +------ demo-angular/app/main.ts | 2 +- demo-angular/package.json | 6 +++--- demo/app/main-page.xml | 5 ++--- demo/app/main-view-model.ts | 7 +++++++ demo/e2e/test.e2e.ts | 31 +++-------------------------- 7 files changed, 19 insertions(+), 43 deletions(-) diff --git a/demo-angular/app/app.component.html b/demo-angular/app/app.component.html index f011b22..82bbd9a 100644 --- a/demo-angular/app/app.component.html +++ b/demo-angular/app/app.component.html @@ -4,13 +4,13 @@ - + - + diff --git a/demo-angular/app/app.component.ts b/demo-angular/app/app.component.ts index 9f9676e..bc2a1c6 100644 --- a/demo-angular/app/app.component.ts +++ b/demo-angular/app/app.component.ts @@ -1,6 +1,4 @@ -import { Component, ChangeDetectorRef } from "@angular/core"; -import { ListView } from "tns-core-modules/ui/list-view"; -import { isAndroid } from "tns-core-modules/platform"; +import { Component } from "@angular/core"; import * as imagepicker from "nativescript-imagepicker"; @Component({ @@ -14,9 +12,6 @@ export class AppComponent { thumbSize: number = 80; previewSize: number = 300; - constructor(private _changeDetectionRef: ChangeDetectorRef) { - } - public onSelectMultipleTap() { this.isSingleMode = false; diff --git a/demo-angular/app/main.ts b/demo-angular/app/main.ts index 639bfd5..5cf76e1 100644 --- a/demo-angular/app/main.ts +++ b/demo-angular/app/main.ts @@ -1,4 +1,4 @@ import { platformNativeScriptDynamic } from "nativescript-angular/platform"; import { AppModule } from "./app.module"; -platformNativeScriptDynamic().bootstrapModule(AppModule); +platformNativeScriptDynamic({ createFrameOnBootstrap: true }).bootstrapModule(AppModule); \ No newline at end of file diff --git a/demo-angular/package.json b/demo-angular/package.json index c60dc67..539d695 100644 --- a/demo-angular/package.json +++ b/demo-angular/package.json @@ -2,10 +2,10 @@ "nativescript": { "id": "org.nativescript.imagepickerdemoangular", "tns-ios": { - "version": "3.4.0" + "version": "4.0.1" }, "tns-android": { - "version": "3.4.0" + "version": "4.0.0" } }, "dependencies": { @@ -23,7 +23,7 @@ "nativescript-unit-test-runner": "^0.3.4", "reflect-metadata": "~0.1.8", "rxjs": "^5.5.0", - "tns-core-modules": "^3.4.0" + "tns-core-modules": "^4.0.0" }, "devDependencies": { "@angular/compiler-cli": "~5.0.0", diff --git a/demo/app/main-page.xml b/demo/app/main-page.xml index 106882a..b237af5 100644 --- a/demo/app/main-page.xml +++ b/demo/app/main-page.xml @@ -3,15 +3,14 @@ - + - -