gpt4 book ai didi

angular - 没有 Facebook 的提供者(Ionic Native)

转载 作者:搜寻专家 更新时间:2023-10-30 21:15:51 24 4
gpt4 key购买 nike

ERROR Error: No provider for Facebook!
    &nbspat injectionError (core.es5.js:1231)
    &nbspat noProviderError (core.es5.js:1269)
    &nbspat ReflectiveInjector_.throwOrNull (core.es5.js:2770)
    &nbspat ReflectiveInjector
.getByKeyDefault (core.es5.js:2809)
    &nbspat ReflectiveInjector
.getByKey (core.es5.js:2741)
    &nbspat ReflectiveInjector
.get (core.es5.js:2610)
    &nbspat AppModuleInjector.NgModuleInjector.get (core.es5.js:3578)
    &nbspat resolveDep (core.es5.js:11039)
    &nbspat createClass (core.es5.js:10903)
     at createDirectiveInstance (core.es5.js:10723)
View_MyApp_Host_0 @ MyApp_Host.html:1

最佳答案

您需要在您的AppModule(app.module.ts 文件)中添加Facebook:

// ...
import { Facebook } from '@ionic-native/facebook';


@NgModule({
declarations: [...],
imports: [...],
bootstrap: [IonicApp],
entryComponents: [...],
providers: [
// ...
Facebook // <--- Here!
// ...
{ provide: ErrorHandler, useClass: IonicErrorHandler }
]
})
export class AppModule { }

关于angular - 没有 Facebook 的提供者(Ionic Native),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46326411/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com