Я установил плагин (ionic plugin add cordova-plugin-fingerprint-aio --save), вот так выглядит мой файл TS.
import { FingerprintAIO, FingerprintOptions } from '@ionic-native/fingerprint-aio';
import { Platform } from '@ionic/angular';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
fingerprintOptions : FingerprintOptions
constructor(private fingerprint: FingerprintAIO, private platform: Platform,) {
this.fingerprintOptions = {
clientId: 'fingerprint-demo',
clientSecret: 'password',
disableBackup: true
}
}
async showFingerPrintDiaglo() {
try {
await this.platform.ready();
const available = await this.fingerprint.isAvailable()
console.log(available);
if(available === "OK") {
const result = await this.fingerprint.show(this.fingerprintOptions)
console.log(result);
}
}
catch (e) {
console.error(e);
}
}
и это то, что я получаю, когда пытаюсь открыть страницу
Uncaught TypeError: Object(...) is not a function
at index.js:92
at Object../node_modules/@ionic-native/fingerprint-aio/index.js (index.js:141)
at __webpack_require__ (bootstrap:81)
at Object../src/app/app.module.ts (app.component.ts:11)
at __webpack_require__ (bootstrap:81)
at Object../src/main.ts (main.ts:1)
at __webpack_require__ (bootstrap:81)
at Object.0 (main.ts:12)
at __webpack_require__ (bootstrap:81)
at checkDeferredModules (bootstrap:43)
Кто-то использовал это раньше или есть идеи, так как я работаю с приложением на Ionic4?