2017-07-19 6 views
0

Ich verwende Cordova PayPal plugin. Aber wenn ich versuche, es zu einer Seite hinzuzufügen, erhalte ich den folgenden Fehler:Anbieter für PayPal ionic

Uncaught (in promise): Error: No provider for PayPal! Error: No provider for PayPal! at injectionError (http://localhost:8100/build/main.js:1510:86) at noProviderError (http://localhost:8100/build/main.js:1548:12) at ReflectiveInjector_.throwOrNull (http://localhost:8100/build/main.js:3049:19) at ReflectiveInjector.getByKeyDefault (http://localhost:8100/build/main.js:3088:25) at ReflectiveInjector.getByKey (http://localhost:8100/build/main.js:3020:25) at ReflectiveInjector.get (http://localhost:8100/build/main.js:2889:21) at AppModuleInjector.get (ng:///AppModule/module.ngfactory.js:358:125) at AppModuleInjector.getInternal (ng:///AppModule/module.ngfactory.js:507:55) at AppModuleInjector.NgModuleInjector.get (http://localhost:8100/build/main.js:3856:44) at resolveDep (http://localhost:8100/build/main.js:11318:45) Stack

irgendwelche Ideen? haben Sie auch einen Vorschlag für das Verständnis von Anbietern und Versprechen?

Antwort

1

In Ihrem app.module.ts fügen die folgenden

Import {PayPal, PayPalPayment, PayPalConfiguration} von '@ ionischer-native/paypal';

Anbieter:

Unter @NgModule Abschnitt, suchen Sie nach Anbieter und fügen 'Paypal', wie unten gezeigt [ PayPal ]