如何删除全屏模式? (InAppBrowser)

时间:2018-06-25 20:44:50

标签: javascript html typescript ionic-framework iframe

我使用Ionic 3。 我的导航栏消失了。我想看一下我的导航栏。  如何删除全屏模式?

import { InAppBrowser, InAppBrowserOptions } from '@ionic-native/in-app-browser'; 
import { Component } from '@angular/core';
import { NavController, Platform } from 'ionic-angular';

declare var navigator: any;
declare var Connection: any;

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})

export class HomePage {
    Connection: any;
    isLaunch: Boolean = false;

    constructor( private platform: Platform, private iab: InAppBrowser) {
        this.platform.ready().then(() => {
            this.launch();
        });

    }

    launch() {
        this.isLaunch = true;
        const browser = this.iab.create('https://twitter.com/','_self' , "location=yes");

    browser.show();
}
}
 <iframe width="100%" height="100%" frameborder="0"></iframe>
  

谢谢。

1 个答案:

答案 0 :(得分:1)

当应用内浏览器打开时,无法保留导航栏。可能有用的一件事是使用themeable-browser,通过它您可以在顶部具有按钮和菜单:

https://ionicframework.com/docs/native/themeable-browser/