Issue
Is there any way to make Browser Tab work with a capacitor react project. I found that it's supported in ionic. I'm relatively new to ionic and capacitor. I'm trying to use this ionic plugin in my react capacitor https://ionicframework.com/docs/intro/cli
but I'm getting this error
Module not found: Can't resolve '@angular/core' in '/Users/userid/Desktop/projectname-irc/node_modules/@ionic-native/browser-tab'
Solution
I found custom tabs are not part of capacitor docs, but they were working through BrowserOptions passes in Browser.open method.
async function openInBrowserTab() {
await Browser.open({ url: 'https://www.google.com/', presentationStyle: 'popover', windowName: '_self' });
}
https://capacitorjs.com/docs/v2/apis/browser#open
Answered By - Viraj Singh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.