我正在尝试将相机集成到我的离子应用程序中,但问题是当我添加原生插件时应用程序显示空白屏幕。以下是我如何在我的应用中添加原生插件。目前我正在为iOS构建这个
npm install @ ionic-native / camera --save
在app.module.ts中我在提供商下添加了相机
从@ ion-native / camera';
导入{相机}提供者:[ 状态栏, 闪屏, 相机, {provide:ErrorHandler,useClass:IonicErrorHandler} ]
如果我保存任何文件,实时重新加载将触发并显示错误屏幕,我无法弄清楚问题是什么。任何人都可以建议。
控制台日志
Error: Debug Failure.
at typeToString (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:28777:22)
at reportRelationError (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:34714:34)
at isRelatedTo (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:34860:21)
at checkTypeRelatedTo (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:34697:26)
at checkTypeAssignableTo (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:34398:20)
at checkVariableLikeDeclaration (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:44884:21)
at checkPropertyDeclaration (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:43383:13)
at checkSourceElement (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:46700:28)
at Object.forEach (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:1506:30)
at checkClassDeclaration (/Users/developermac/Desktop/samples/sample1/node_modules/typescript/lib/typescript.js:45765:16)