Nabajyoti Das
Nabajyoti Das

Reputation: 1

Capacitor Android app external links does not open in external browser

I am a new in capacitor with ionic. In my app lots of external url is there, I am trying to do is once user click on external link it should open in external browser but its try to open in app itself. In iOS its working as expected.

Upvotes: 0

Views: 2961

Answers (2)

Borja
Borja

Reputation: 99

I had a similar problem and I ended up using javascript

<a (click)="openLink(userManual)">User manual</a>
openLink(link: string) {
    window.open(link, '_self');
}

Upvotes: 0

RGe
RGe

Reputation: 1859

Add target="_blank" to your link. Example:

 <a href="https://www.w3schools.com" target="_blank">Visit W3Schools</a> 

Upvotes: 0

Related Questions