答案 0 :(得分:1)
安装插件后
ionic cordova plugin add phonegap-nfc
npm install --save @ionic-native/nfc
您需要将其添加到App应用模块的providers
数组中(app.module.ts
):
...
import { NFC } from '@ionic-native/nfc';
...
@NgModule({
...
providers: [
...
NFC, // <----- like this!
...
]
...
})
export class AppModule { }