Skip to content

Instantly share code, notes, and snippets.

@TheBrown
Created November 13, 2017 11:00
Show Gist options
  • Save TheBrown/7c31b3f282a9bed665fcb681cd41a627 to your computer and use it in GitHub Desktop.
Save TheBrown/7c31b3f282a9bed665fcb681cd41a627 to your computer and use it in GitHub Desktop.
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { InAppBrowser, InAppBrowserOptions} from '@ionic-native/in-app-browser';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
options : InAppBrowserOptions = {
location : 'no',//Or 'no'
hidden : 'no', //Or 'yes'
clearcache : 'yes',
clearsessioncache : 'yes',
zoom : 'yes',//Android only ,shows browser zoom controls
hardwareback : 'yes',
mediaPlaybackRequiresUserAction : 'no',
shouldPauseOnSuspend : 'no', //Android only
closebuttoncaption : 'Close', //iOS only
disallowoverscroll : 'no', //iOS only
toolbar : 'yes', //iOS only
enableViewportScale : 'no', //iOS only
allowInlineMediaPlayback : 'no',//iOS only
presentationstyle : 'pagesheet',//iOS only
fullscreen : 'yes',//Windows only
};
constructor(public navCtrl: NavController, public iab: InAppBrowser) {
this.iab.create("https://laoitdev.com","_self", this.options);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment