每当我尝试在ionic中添加PhotoLibrary插件时,都无法在app.module.ts中添加它。我收到以下错误
Type 'PhotoLibraryOriginal' is not assignable to type 'Provider'.
Type 'PhotoLibraryOriginal' is missing the following properties from type 'FactoryProvider': provide, useFactory [2322]
(alias) const PhotoLibrary: PhotoLibraryOriginal
import PhotoLibrary
请检查下图以获取完整错误。
答案 0 :(得分:1)
从/ngx
导入与ionic-angular
应用一起使用的所有最新离子本机插件...
import { PhotoLibrary } from '@ionic-native/photo-library/ngx';
其他版本回退到插件的版本4。*