I am using InAppBrowser in my app to open a link in the system browser. It is working fine. But, when i close the browser using the backbutton, i could not go to my previous state of the app. I need to simply close the browser and return to previous state of my app.
// in .html file
<ion-col col-4>
<a href= "#" ion-item class="min-height"
(click)="GotoLink(patientNote[0].FileUrl)">
<ion-icon name="ios-attach-outline" class="note-icon"></ion-icon>
</a>
</ion-col>
// in .ts file
import {InAppBrowser} from "@ionic-native/in-app-browser";
@IonicPage()
@Component({
selector: 'page-update-progress-note',
templateUrl: 'update-progress-note.html',
})
export class UpdateProgressNotePage {
constructor(private iab: InAppBrowser){}
private GotoLink = (url): void => {
this.iab.create(url, '_system', 'location=yes, hardwareback=no');
};
}
How can i simply close the browser when using close button of the browser or using the back button and return to the previous step of my application?