Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document or add getPlugin() #582

Closed
mlynch opened this issue Sep 25, 2016 · 5 comments
Closed

Document or add getPlugin() #582

mlynch opened this issue Sep 25, 2016 · 5 comments

Comments

@mlynch
Copy link
Collaborator

mlynch commented Sep 25, 2016

Should be possible to fallback to calling plugin directly, with our helper magic. Note to self mainly

@ihadeed
Copy link
Collaborator

ihadeed commented Sep 25, 2016

As in a method that is injected automatically by the @Plugin() decorator that returns pluginRef (as object, not string) ? or are you referring to the getPlugin() that is exported from plugin.ts ?

@mlynch
Copy link
Collaborator Author

mlynch commented Sep 25, 2016

Yea, I want to avoid people having to call the plugin directly on their own (to verify an issue, for example), and be able to still use the ionic-native class since we're not always 100% up to date w plugin changes

@ihadeed
Copy link
Collaborator

ihadeed commented Sep 25, 2016

Would be cool if the method is available in every class automagically ... so the user wouldn't have to figure out what the pluginRef is .. They can just call Camera.getPlugin().getPicture(...) for example.

@mlynch
Copy link
Collaborator Author

mlynch commented Sep 25, 2016

Yep, exactly. Will be a nice "escape hatch"

@mlynch mlynch closed this as completed in d45a2b5 Sep 25, 2016
@mlynch
Copy link
Collaborator Author

mlynch commented Sep 25, 2016

Pretty simple, figured adding the plugin check wouldn't be appropriate here as that could be annoying. Instead, they can call checkInstall() for a check w/ full error report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants