I’m using Ionic Native Keyboard following a video tutorial for an Ionic v3 application and it seems to be an error due to changes in the version of native keyboard used in the tutorial and the current version avaliable in Ionic documentation. Current version --> https://ionicframework.com/docs/native/native-keyboard
Old version uses an slightly different import method. So when I declared the native keyboard in constructure in .ts file and ran a console log to check it is functioning, I got an error:
import { NativeKeyboard } from '@ionic-native/native-keyboard/ngx';
constructor(
...
private nativeKeyboard: NativeKeyboard
) {
//Here comes the error:
this.nativeKeyboard.onKeyboardShow().subscribe(() =>{
console.log('keyboard openned')
})
}
Error message:
What should I do?