@regulaforensics/face-sdk 7.2.423-beta → 7.2.429-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/RNFaceSDK.podspec +1 -1
- package/android/src/main/java/com/regula/plugin/facesdk/JSONConstructor.kt +2 -0
- package/android/src/main/java/com/regula/plugin/facesdk/Main.kt +18 -0
- package/examples/capacitor/android/app/src/main/AndroidManifest.xml +2 -2
- package/examples/capacitor/index.html +2 -7
- package/examples/capacitor/index.tsx +53 -0
- package/examples/capacitor/package-lock.json +27 -163
- package/examples/capacitor/package.json +3 -3
- package/examples/capacitor/scripts/setup.sh +4 -2
- package/examples/capacitor/src/main.css +60 -6
- package/examples/capacitor/src/main.html +1 -1
- package/examples/capacitor/src/main.tsx +51 -87
- package/examples/ionic/README.md +1 -1
- package/examples/ionic/angular.json +3 -3
- package/examples/ionic/config.xml +4 -2
- package/examples/ionic/index.tsx +68 -0
- package/examples/ionic/package-lock.json +830 -770
- package/examples/ionic/package.json +2 -2
- package/examples/ionic/src/main.css +60 -6
- package/examples/ionic/src/main.html +1 -1
- package/examples/ionic/src/{main.ts → main.tsx} +52 -97
- package/examples/ionic/tsconfig.json +3 -2
- package/examples/react_native/README.md +1 -0
- package/examples/react_native/app.config.ts +1 -1
- package/examples/react_native/index.tsx +49 -7
- package/examples/react_native/package-lock.json +618 -621
- package/examples/react_native/package.json +8 -8
- package/examples/react_native/src/main.css +60 -6
- package/examples/react_native/src/main.html +1 -1
- package/examples/react_native/src/main.tsx +54 -80
- package/ios/RFSWJSONConstructor.h +0 -1
- package/ios/RFSWJSONConstructor.m +5 -14
- package/ios/RFSWMain.m +30 -0
- package/package.json +1 -1
- package/plugin.xml +1 -1
- package/test/json.tsx +375 -0
- package/test/package-lock.json +584 -0
- package/test/package.json +9 -0
- package/test/test.tsx +61 -0
- package/test/utils.tsx +38 -0
- package/www/capacitor/customization/customization_fonts.js +1 -1
- package/www/capacitor/customization/customization_images.js +1 -1
- package/www/capacitor/customization/font.js +8 -0
- package/www/capacitor/detect_faces/detect_face_result.js +12 -0
- package/www/capacitor/detect_faces/detect_faces_attribute_result.js +9 -0
- package/www/capacitor/detect_faces/detect_faces_backend_exception.js +7 -0
- package/www/capacitor/detect_faces/detect_faces_config.js +34 -0
- package/www/capacitor/detect_faces/detect_faces_exception.js +8 -0
- package/www/capacitor/detect_faces/detect_faces_request.js +22 -0
- package/www/capacitor/detect_faces/detect_faces_response.js +9 -0
- package/www/capacitor/face_capture/face_capture_config.js +37 -0
- package/www/capacitor/face_capture/face_capture_exception.js +7 -0
- package/www/capacitor/face_capture/face_capture_image.js +8 -0
- package/www/capacitor/face_capture/face_capture_response.js +7 -0
- package/www/capacitor/image_params/output_image_crop.js +23 -0
- package/www/capacitor/image_params/output_image_params.js +19 -0
- package/www/capacitor/image_params/point.js +7 -0
- package/www/capacitor/image_params/rect.js +9 -0
- package/www/capacitor/image_params/size.js +12 -0
- package/www/capacitor/image_quality/image_quality_characteristic.js +22 -0
- package/www/capacitor/image_quality/image_quality_range.js +7 -0
- package/www/capacitor/image_quality/image_quality_result.js +10 -0
- package/www/capacitor/index.js +48 -0
- package/www/capacitor/init/face_sdk_version.js +8 -0
- package/www/capacitor/init/init_config.js +19 -0
- package/www/capacitor/init/init_exception.js +8 -0
- package/www/capacitor/init/license_exception.js +7 -0
- package/www/capacitor/internal/bridge.js +20 -1
- package/www/capacitor/liveness/liveness_backend_exception.js +7 -0
- package/www/capacitor/liveness/liveness_config.js +43 -0
- package/www/capacitor/liveness/liveness_exception.js +8 -0
- package/www/capacitor/liveness/liveness_notification.js +7 -0
- package/www/capacitor/liveness/liveness_response.js +11 -0
- package/www/capacitor/match_faces/compared_face.js +9 -0
- package/www/capacitor/match_faces/compared_faces_pair.js +10 -0
- package/www/capacitor/match_faces/compared_faces_split.js +7 -0
- package/www/capacitor/match_faces/match_faces_backend_exception.js +7 -0
- package/www/capacitor/match_faces/match_faces_config.js +19 -0
- package/www/capacitor/match_faces/match_faces_detection.js +9 -0
- package/www/capacitor/match_faces/match_faces_detection_face.js +11 -0
- package/www/capacitor/match_faces/match_faces_exception.js +8 -0
- package/www/capacitor/match_faces/match_faces_image.js +9 -0
- package/www/capacitor/match_faces/match_faces_request.js +27 -0
- package/www/capacitor/match_faces/match_faces_response.js +9 -0
- package/www/capacitor/person_database/edit_group_persons_request.js +15 -0
- package/www/capacitor/person_database/image_upload.js +17 -0
- package/www/capacitor/person_database/pageable_item_list.js +8 -0
- package/www/capacitor/person_database/person.js +13 -0
- package/www/capacitor/person_database/person_group.js +11 -0
- package/www/capacitor/person_database/person_image.js +13 -0
- package/www/capacitor/person_database/search_person.js +14 -0
- package/www/capacitor/person_database/search_person_detection.js +9 -0
- package/www/capacitor/person_database/search_person_image.js +15 -0
- package/www/capacitor/person_database/search_person_request.js +29 -0
- package/www/cordova.js +753 -6
- package/www/react-native/customization/customization_fonts.js +1 -1
- package/www/react-native/customization/customization_images.js +1 -1
- package/www/react-native/customization/font.js +8 -0
- package/www/react-native/detect_faces/detect_face_result.js +12 -0
- package/www/react-native/detect_faces/detect_faces_attribute_result.js +9 -0
- package/www/react-native/detect_faces/detect_faces_backend_exception.js +7 -0
- package/www/react-native/detect_faces/detect_faces_config.js +34 -0
- package/www/react-native/detect_faces/detect_faces_exception.js +8 -0
- package/www/react-native/detect_faces/detect_faces_request.js +22 -0
- package/www/react-native/detect_faces/detect_faces_response.js +9 -0
- package/www/react-native/face_capture/face_capture_config.js +37 -0
- package/www/react-native/face_capture/face_capture_exception.js +7 -0
- package/www/react-native/face_capture/face_capture_image.js +8 -0
- package/www/react-native/face_capture/face_capture_response.js +7 -0
- package/www/react-native/image_params/output_image_crop.js +23 -0
- package/www/react-native/image_params/output_image_params.js +19 -0
- package/www/react-native/image_params/point.js +7 -0
- package/www/react-native/image_params/rect.js +9 -0
- package/www/react-native/image_params/size.js +12 -0
- package/www/react-native/image_quality/image_quality_characteristic.js +22 -0
- package/www/react-native/image_quality/image_quality_range.js +7 -0
- package/www/react-native/image_quality/image_quality_result.js +10 -0
- package/www/react-native/index.js +48 -0
- package/www/react-native/init/face_sdk_version.js +8 -0
- package/www/react-native/init/init_config.js +19 -0
- package/www/react-native/init/init_exception.js +8 -0
- package/www/react-native/init/license_exception.js +7 -0
- package/www/react-native/internal/bridge.js +20 -1
- package/www/react-native/liveness/liveness_backend_exception.js +7 -0
- package/www/react-native/liveness/liveness_config.js +43 -0
- package/www/react-native/liveness/liveness_exception.js +8 -0
- package/www/react-native/liveness/liveness_notification.js +7 -0
- package/www/react-native/liveness/liveness_response.js +11 -0
- package/www/react-native/match_faces/compared_face.js +9 -0
- package/www/react-native/match_faces/compared_faces_pair.js +10 -0
- package/www/react-native/match_faces/compared_faces_split.js +7 -0
- package/www/react-native/match_faces/match_faces_backend_exception.js +7 -0
- package/www/react-native/match_faces/match_faces_config.js +19 -0
- package/www/react-native/match_faces/match_faces_detection.js +9 -0
- package/www/react-native/match_faces/match_faces_detection_face.js +11 -0
- package/www/react-native/match_faces/match_faces_exception.js +8 -0
- package/www/react-native/match_faces/match_faces_image.js +9 -0
- package/www/react-native/match_faces/match_faces_request.js +27 -0
- package/www/react-native/match_faces/match_faces_response.js +9 -0
- package/www/react-native/person_database/edit_group_persons_request.js +15 -0
- package/www/react-native/person_database/image_upload.js +17 -0
- package/www/react-native/person_database/pageable_item_list.js +8 -0
- package/www/react-native/person_database/person.js +13 -0
- package/www/react-native/person_database/person_group.js +11 -0
- package/www/react-native/person_database/person_image.js +13 -0
- package/www/react-native/person_database/search_person.js +14 -0
- package/www/react-native/person_database/search_person_detection.js +9 -0
- package/www/react-native/person_database/search_person_image.js +15 -0
- package/www/react-native/person_database/search_person_request.js +29 -0
- package/www/types/index.d.ts +12 -0
- package/www/types/match_faces/match_faces_config.d.ts +2 -0
- package/www/types/person_database/search_person_request.d.ts +4 -0
- package/examples/cordova/.vscode/launch.json +0 -28
- package/examples/cordova/README.md +0 -25
- package/examples/cordova/config.xml +0 -26
- package/examples/cordova/package-lock.json +0 -1313
- package/examples/cordova/package.json +0 -30
- package/examples/cordova/scripts/android.sh +0 -8
- package/examples/cordova/scripts/ios.sh +0 -8
- package/examples/cordova/scripts/setup.sh +0 -8
- package/examples/cordova/www/images/logo.png +0 -0
- package/examples/cordova/www/index.html +0 -21
- package/examples/cordova/www/src/main.css +0 -83
- package/examples/cordova/www/src/main.html +0 -25
- package/examples/cordova/www/src/main.js +0 -152
- package/examples/ionic/index.ts +0 -17
- package/examples/ionic/src/images/portrait.png +0 -0
- /package/examples/ionic/{src/assets → assets}/.gitkeep +0 -0
- /package/examples/ionic/{src/images → images}/icon.png +0 -0
- /package/examples/{cordova/www → ionic}/images/portrait.png +0 -0
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import '@ionic/react/css/core.css'
|
|
2
|
-
import './main.css'
|
|
3
|
-
import { setupIonicReact } from '@ionic/react'
|
|
4
|
-
import { StatusBar, Style } from '@capacitor/status-bar'
|
|
5
|
-
import { File } from '@awesome-cordova-plugins/file'
|
|
6
|
-
import { Dialog } from '@capacitor/dialog'
|
|
7
|
-
import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera'
|
|
8
1
|
import { FaceSDK, MatchFacesRequest, MatchFacesImage, InitConfig, LivenessSkipStep, ImageType, LivenessStatus, LivenessConfig } from '@regulaforensics/face-sdk'
|
|
2
|
+
import { loadAssetIfExists, chooseOption, pickImage } from '../index'
|
|
3
|
+
|
|
4
|
+
var faceSdk = FaceSDK.instance
|
|
5
|
+
var image1: MatchFacesImage | null
|
|
6
|
+
var image2: MatchFacesImage | null
|
|
9
7
|
|
|
10
8
|
async function init() {
|
|
11
9
|
if (!await initializeReader()) return
|
|
12
10
|
setStatus("Ready")
|
|
13
11
|
}
|
|
14
12
|
|
|
13
|
+
async function startFaceCapture(position: number) {
|
|
14
|
+
var image = (await faceSdk.startFaceCapture()).image
|
|
15
|
+
if (image == null) return
|
|
16
|
+
setImage("data:image/png;base64," + image.image, image.imageType, position)
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
async function startLiveness() {
|
|
16
20
|
var response = await faceSdk.startLiveness({
|
|
17
21
|
config: new LivenessConfig({
|
|
@@ -42,30 +46,15 @@ async function matchFaces() {
|
|
|
42
46
|
setStatus("Ready")
|
|
43
47
|
}
|
|
44
48
|
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// If 'regula.license' exists, init using license(enables offline match)
|
|
55
|
-
// otherwise init without license.
|
|
56
|
-
async function initializeReader() {
|
|
57
|
-
setStatus("Initializing...")
|
|
58
|
-
|
|
59
|
-
var license = await loadAssetIfExists("regula.license")
|
|
60
|
-
var config: InitConfig | undefined
|
|
61
|
-
if (license != null) config = new InitConfig(license)
|
|
62
|
-
var [success, error] = await faceSdk.initialize({ config: config })
|
|
63
|
-
|
|
64
|
-
if (!success && error != null) {
|
|
65
|
-
setStatus(error.message)
|
|
66
|
-
console.log(error.code + ": " + error.message)
|
|
49
|
+
async function getImage(position: number) {
|
|
50
|
+
var source = await chooseOption()
|
|
51
|
+
if (source == null) return
|
|
52
|
+
if (source) startFaceCapture(position)
|
|
53
|
+
else {
|
|
54
|
+
var image = await pickImage()
|
|
55
|
+
if (image == null) return
|
|
56
|
+
setImage(image, ImageType.PRINTED, position)
|
|
67
57
|
}
|
|
68
|
-
return success
|
|
69
58
|
}
|
|
70
59
|
|
|
71
60
|
function setImage(base64: string, type: number, position: number) {
|
|
@@ -82,71 +71,46 @@ function setImage(base64: string, type: number, position: number) {
|
|
|
82
71
|
}
|
|
83
72
|
}
|
|
84
73
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
setImage("data:image/png;base64," + image.image, image.imageType, position)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
async function useGallery(position: number) {
|
|
93
|
-
var image = await Camera.getPicture({
|
|
94
|
-
destinationType: DestinationType.DATA_URL,
|
|
95
|
-
mediaType: MediaType.PICTURE,
|
|
96
|
-
sourceType: PictureSourceType.PHOTOLIBRARY
|
|
97
|
-
})
|
|
98
|
-
setImage(image, ImageType.PRINTED, position)
|
|
99
|
-
}
|
|
74
|
+
// If 'regula.license' exists, init using license(enables offline match)
|
|
75
|
+
// otherwise init without license.
|
|
76
|
+
async function initializeReader() {
|
|
77
|
+
setStatus("Initializing...")
|
|
100
78
|
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
cancelButtonTitle: "Use gallery"
|
|
106
|
-
})
|
|
107
|
-
if (response.value) useCamera(position)
|
|
108
|
-
else useGallery(position)
|
|
109
|
-
}
|
|
79
|
+
var license = await loadAssetIfExists("regula.license")
|
|
80
|
+
var config: InitConfig | undefined
|
|
81
|
+
if (license != null) config = new InitConfig(license)
|
|
82
|
+
var [success, error] = await faceSdk.initialize({ config: config })
|
|
110
83
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
var fileEntry = await File.getFile(dir, path, null)
|
|
115
|
-
var result = await new Promise<string | null>((resolve, _) => {
|
|
116
|
-
fileEntry.file(file => {
|
|
117
|
-
var reader = new FileReader()
|
|
118
|
-
reader.onloadend = (_) => resolve(reader.result as string)
|
|
119
|
-
reader.readAsDataURL(file)
|
|
120
|
-
}, _ => resolve(null))
|
|
121
|
-
})
|
|
122
|
-
return result
|
|
123
|
-
} catch (_) {
|
|
124
|
-
return null
|
|
84
|
+
if (error != null) {
|
|
85
|
+
setStatus(error.message)
|
|
86
|
+
console.log(error.code + ": " + error.message)
|
|
125
87
|
}
|
|
88
|
+
return success
|
|
126
89
|
}
|
|
127
90
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
91
|
+
// --------------------------------------------------------------------------------------------------------------------
|
|
92
|
+
|
|
93
|
+
export function main() {
|
|
94
|
+
document.getElementById("first-image")!.onclick = () => getImage(1)
|
|
95
|
+
document.getElementById("second-image")!.onclick = () => getImage(2)
|
|
96
|
+
document.getElementById("match-faces")!.onclick = () => matchFaces()
|
|
97
|
+
document.getElementById("start-liveness")!.onclick = () => startLiveness()
|
|
98
|
+
document.getElementById("clear-results")!.onclick = () => clearResults()
|
|
131
99
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
100
|
+
init()
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
var setStatus = (data: string) => document.getElementById("status")!.innerHTML = data
|
|
104
|
+
var setLivenessStatus = (data: string) => document.getElementById("liveness-status")!.innerHTML = data
|
|
105
|
+
var setSimilarityStatus = (data: string) => document.getElementById("similarity-status")!.innerHTML = data
|
|
135
106
|
var setUiImage1 = (data: string) => (document.getElementById("first-image") as HTMLImageElement).src = data
|
|
136
107
|
var setUiImage2 = (data: string) => (document.getElementById("second-image") as HTMLImageElement).src = data
|
|
137
|
-
var
|
|
108
|
+
var clearResults = () => {
|
|
109
|
+
setStatus("Ready")
|
|
110
|
+
setSimilarityStatus("null")
|
|
111
|
+
setLivenessStatus("null")
|
|
138
112
|
setUiImage1("images/portrait.png")
|
|
139
113
|
setUiImage2("images/portrait.png")
|
|
114
|
+
image1 = null
|
|
115
|
+
image2 = null
|
|
140
116
|
}
|
|
141
|
-
|
|
142
|
-
setupIonicReact()
|
|
143
|
-
StatusBar.setStyle({ style: Style.Light })
|
|
144
|
-
document.addEventListener('deviceready', () => {
|
|
145
|
-
document.getElementById("first-image").onclick = () => pickImage(1)
|
|
146
|
-
document.getElementById("second-image").onclick = () => pickImage(2)
|
|
147
|
-
document.getElementById("match-faces").onclick = () => matchFaces()
|
|
148
|
-
document.getElementById("start-liveness").onclick = () => startLiveness()
|
|
149
|
-
document.getElementById("clear-results").onclick = () => clearResults()
|
|
150
|
-
|
|
151
|
-
init()
|
|
152
|
-
})
|
package/examples/ionic/README.md
CHANGED
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"options": {
|
|
12
12
|
"outputPath": "www",
|
|
13
13
|
"index": "index.html",
|
|
14
|
-
"main": "index.
|
|
14
|
+
"main": "index.tsx",
|
|
15
15
|
"tsConfig": "tsconfig.json",
|
|
16
16
|
"assets": [
|
|
17
17
|
{
|
|
18
18
|
"glob": "**/*",
|
|
19
|
-
"input": "
|
|
19
|
+
"input": "assets",
|
|
20
20
|
"output": "assets"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"glob": "**/*",
|
|
24
|
-
"input": "
|
|
24
|
+
"input": "images",
|
|
25
25
|
"output": "images"
|
|
26
26
|
}
|
|
27
27
|
]
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<widget android-packageName="com.regula.documentreader.api.androidtest" ios-CFBundleIdentifier="com.regula.documentreader.qa" version="1.0.0"
|
|
2
|
+
<widget android-packageName="com.regula.documentreader.api.androidtest" ios-CFBundleIdentifier="com.regula.documentreader.qa" version="1.0.0"
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
4
|
<name>FaceSDK</name>
|
|
4
|
-
<icon src="
|
|
5
|
+
<icon src="images/icon.png" />
|
|
5
6
|
<platform name="android">
|
|
6
7
|
<preference name="orientation" value="portrait" />
|
|
7
8
|
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
|
|
@@ -12,6 +13,7 @@
|
|
|
12
13
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
13
14
|
</platform>
|
|
14
15
|
<platform name="ios">
|
|
16
|
+
<preference name="deployment-target" value="14.0" />
|
|
15
17
|
<preference name="orientation" value="portrait" />
|
|
16
18
|
<allow-intent href="itms:*" />
|
|
17
19
|
<allow-intent href="itms-apps:*" />
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import 'zone.js';
|
|
2
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
|
3
|
+
import { BrowserModule } from '@angular/platform-browser'
|
|
4
|
+
import { IonicModule, Platform } from '@ionic/angular'
|
|
5
|
+
import { NgModule } from '@angular/core'
|
|
6
|
+
|
|
7
|
+
import { Component } from '@angular/core'
|
|
8
|
+
import { File } from '@awesome-cordova-plugins/file'
|
|
9
|
+
import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera/ngx'
|
|
10
|
+
import { Dialogs } from '@awesome-cordova-plugins/dialogs/ngx'
|
|
11
|
+
|
|
12
|
+
import { main } from './src/main'
|
|
13
|
+
|
|
14
|
+
export async function loadAssetIfExists(path: string): Promise<string | null> {
|
|
15
|
+
try {
|
|
16
|
+
var dir = await File.resolveDirectoryUrl(File.applicationDirectory + "www/assets")
|
|
17
|
+
var fileEntry = await File.getFile(dir, path, null)
|
|
18
|
+
var result = await new Promise<string | null>((resolve, _) => {
|
|
19
|
+
fileEntry.file(file => {
|
|
20
|
+
var reader = new FileReader()
|
|
21
|
+
reader.onloadend = (_) => resolve(reader.result as string)
|
|
22
|
+
reader.readAsDataURL(file)
|
|
23
|
+
}, _ => resolve(null))
|
|
24
|
+
})
|
|
25
|
+
return result
|
|
26
|
+
} catch (_) {
|
|
27
|
+
return null
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export async function pickImage(): Promise<string | null> {
|
|
32
|
+
return await cameraInstance.getPicture({
|
|
33
|
+
destinationType: DestinationType.DATA_URL,
|
|
34
|
+
mediaType: MediaType.PICTURE,
|
|
35
|
+
sourceType: PictureSourceType.PHOTOLIBRARY
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function chooseOption(): Promise<boolean | null> {
|
|
40
|
+
return await dialogsInstance.confirm("", "Select option", [
|
|
41
|
+
"Use camera",
|
|
42
|
+
"Use gallery"
|
|
43
|
+
]) == 1
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var cameraInstance: Camera
|
|
47
|
+
var dialogsInstance: Dialogs
|
|
48
|
+
@Component({
|
|
49
|
+
selector: 'app-root',
|
|
50
|
+
templateUrl: 'src/main.html',
|
|
51
|
+
styleUrl: 'src/main.css'
|
|
52
|
+
})
|
|
53
|
+
class Main {
|
|
54
|
+
constructor(platform: Platform, camera: Camera, dialogs: Dialogs) {
|
|
55
|
+
cameraInstance = camera
|
|
56
|
+
dialogsInstance = dialogs
|
|
57
|
+
platform.ready().then(main)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@NgModule({
|
|
62
|
+
bootstrap: [Main],
|
|
63
|
+
providers: [Platform, Camera, Dialogs],
|
|
64
|
+
imports: [BrowserModule, IonicModule.forRoot()]
|
|
65
|
+
})
|
|
66
|
+
class MainModule { }
|
|
67
|
+
|
|
68
|
+
platformBrowserDynamic().bootstrapModule(MainModule)
|