EinfachHans / capacitor-email-composer

E-Mail Composer Plugin for Capacitor
MIT License
21 stars 7 forks source link

Error to import interface in angular app #12

Closed ludonoel1 closed 2 years ago

ludonoel1 commented 2 years ago

I tried to inject with a simple "public emailComposer: EmailComposerPlugin" in my constructor but I get this error: RROR Error: Uncaught (in promise): Error: This constructor is not compatible with Angular Dependency Injection because its dependency at index 1 of the parameter list is invalid. This can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.

Please check that 1) the type for the parameter at index 1 is correct and 2) the correct Angular decorators are defined for this class and its ancestors. Error: This constructor is not compatible with Angular Dependency Injection because its dependency at index 1 of the parameter list is invalid. This can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.

Please check that 1) the type for the parameter at index 1 is correct and 2) the correct Angular decorators are defined for this class and its ancestors.

EinfachHans commented 2 years ago

That's not how u use capacitor plugins. Just import and use them directly

ludonoel1 commented 2 years ago

You are right, I was importing: EmailComposerPlugin My bad.