Cap-go / capacitor-inappbrowser

Capacitor plugin in app browser with urlChangeEvent
MIT License
66 stars 48 forks source link

How to use plugin #31

Closed DidoMarchet closed 1 year ago

DidoMarchet commented 1 year ago

Hi guys, sorry for the dummy question but I'm asking you how to use the plugin. I installed it, I've sync capacitor and after? I must import browser from the plugin ot I still use the capacitor browser?

Really thanks and kind regards,

Davide

riderx commented 1 year ago

Hey @DidoMarchet there no bad question no worry. The doc could be improved ! use it like that:

import { CapacitorInappbrowser } from '@capgo/inappbrowser'

CapacitorInappbrowser.open("YOUR_URL");
DidoMarchet commented 1 year ago

Hi @riderx thanks for reply!

i still have an error :(

It returns: Uncaught (in promise) SyntaxError: The requested module '/node_modules/.vite/deps/@capgo_inappbrowser.js?v=c0eea13c' does not provide an export named 'CapacitorInappbrowser'

I installed "@capgo/inappbrowser": "^0.4.7" with ionic core 7 and capacitor 4 and Vue 3.

If you can help me i'm really really glad because the functionality of this plugin is awesome.

Thanks and kind regards,

Davide

riderx commented 1 year ago

@DidoMarchet sorry i missleaded you. it's InAppBrowser instead of CapacitorInappbrowser

DidoMarchet commented 1 year ago

hi @riderx , the correct is import { InAppBrowser } from "@capgo/inappbrowser"; and it works like a charm! Really thanks!

riderx commented 1 year ago

Thanks for the report, i added it to the readme as well !