I am using the examples for Touch ID (code below). Everything looks fine, except that on the device I see a black screen and in the browser I get an “Uncaught (in promise): Error: No Provider for TouchID!”
Any suggestions?
import { Component } from '@angular/core';
import { NavController,Platform } from 'ionic-angular';
import { TouchID } from '@ionic-native/touch-id';
import { ContactPage } from '../contact/contact';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
private touchIdAvailable: boolean;
constructor(public navCtrl: NavController, private touchId: TouchID,private _platform: Platform) {
this._platform.ready().then(() => {
this.touchId.isAvailable().then(
res => this.touchIdAvailable = true,
err => this.touchIdAvailable = false
);
})
}
private startTouchID () {
this.touchId.verifyFingerprint('Fingerprints are Awesome')
.then(
res => this.navCtrl.push(ContactPage),
err => console.error('Error', err)
);
}
}