hello,
if I understand it right that you get undefined, because magic late binding to a plugin fails. If yes, you should provide name of the plugin, because different plugins has maybe different solutions.
Maybe one of the definitions in this post helps. How to use non native plugins on Ionic?
If I am wrong, sorry for disturbing.
Best regards, anna-liebt