From eab6b7d4cae6d80b503704ef888f7c2850a2762e Mon Sep 17 00:00:00 2001 From: EddyVerbruggen Date: Tue, 5 Feb 2019 09:52:50 +0100 Subject: [PATCH] [iOS & Angular] Open barcode scanner from a modal page not working #183 --- CHANGELOG.md | 7 +- demo-ng/app/app.module.ts | 7 +- demo-ng/app/item/items.component.html | 11 +-- demo-ng/app/item/items.component.ts | 19 +++++- demo-ng/app/item/modal/modal.component.css | 0 demo-ng/app/item/modal/modal.component.html | 5 ++ demo-ng/app/item/modal/modal.component.ts | 60 ++++++++++++++++ src/barcodescanner.ios.ts | 76 +++++++++++++++++---- src/package.json | 2 +- 9 files changed, 161 insertions(+), 26 deletions(-) create mode 100644 demo-ng/app/item/modal/modal.component.css create mode 100644 demo-ng/app/item/modal/modal.component.html create mode 100644 demo-ng/app/item/modal/modal.component.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 78d103c..ad9ac03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,14 @@ # Changelog -## [2.8.0](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/3.0.0) (2019-01-10) +## [3.0.2](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/3.0.2) (2019-02-05) +[Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/milestone/34?closed=1) + + +## [3.0.0](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/3.0.0) (2019-01-10) [Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/milestone/33?closed=1) > Breaking change: see https://github.com/EddyVerbruggen/nativescript-barcodescanner#a-note-about-upc_a-and-ean_13 - ## [2.7.9](https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/2.7.9) (2018-11-16) [Full Changelog](https://github.com/EddyVerbruggen/nativescript-barcodescanner/milestone/32?closed=1) diff --git a/demo-ng/app/app.module.ts b/demo-ng/app/app.module.ts index f34153e..026e18b 100644 --- a/demo-ng/app/app.module.ts +++ b/demo-ng/app/app.module.ts @@ -14,6 +14,7 @@ import { ItemDetailComponent } from "./item/item-detail.component"; // import { NativeScriptHttpModule } from "nativescript-angular/http"; import { registerElement } from "nativescript-angular/element-registry"; import { BarcodeScanner } from "nativescript-barcodescanner"; +import { ModalComponent } from "~/item/modal/modal.component"; registerElement("BarcodeScanner", () => require("nativescript-barcodescanner").BarcodeScannerView); @NgModule({ @@ -27,7 +28,8 @@ registerElement("BarcodeScanner", () => require("nativescript-barcodescanner").B declarations: [ AppComponent, ItemsComponent, - ItemDetailComponent + ItemDetailComponent, + ModalComponent ], providers: [ ItemService, @@ -35,7 +37,8 @@ registerElement("BarcodeScanner", () => require("nativescript-barcodescanner").B ], schemas: [ NO_ERRORS_SCHEMA - ] + ], + entryComponents: [ModalComponent], }) /* Pass your application module to the bootstrapModule function located in main.ts to start your app diff --git a/demo-ng/app/item/items.component.html b/demo-ng/app/item/items.component.html index 55e87e3..f0195ab 100644 --- a/demo-ng/app/item/items.component.html +++ b/demo-ng/app/item/items.component.html @@ -1,8 +1,8 @@ @@ -10,7 +10,10 @@ The ActionBar is the NativeScript common abstraction over the Android ActionBar and iOS NavigationBar. http://docs.nativescript.org/ui/action-bar --> - + + + +