Importing cordova plugin vars to Vue components
-
I’m attempting to use
cordova-plugin-camera-preview
in a quasar project, but in my Vue /layouts, I need access to theCameraPreview
object this plugin provides. I’ve tried:import 'cordova-plugin-camera-preview'
import { CameraPreview } from 'cordova-plugin-camera-preview'
but no dice. Any tips?
Link to plugin: https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview
-
Usually Cordova plugins inject their object to the global window scope. I see no imports required in this plugin’s docs. So just install it then use
window.CameraPreview
. Or contact the plugin owner for more info.