1、先安装ThemeableBrowser插件
分别执行以下命令
ionic cordova plugin add cordova-plugin-themeablebrowser
npm install --save @ionic-native/themeable-browser
2、使用ThemeableBrowser插件
如下demo:
import {
Component }
from
'@angular/core';
import {
IonicPage,
NavController,
NavParams }
from
'ionic-angular';
import {
ThemeableBrowser}
from
"ionic-native";
@
IonicPage()
@
Component({
selector:
'page-woqu',
templateUrl:
'woqu.html',
})
export
class
WoquPage {
constructor(
public
navCtrl:
NavController,
public
navParams:
NavParams) {
}
ionViewDidLoad() {
console.
log(
'ionViewDidLoad WoquPage');
}
liulanqi(){
let
options = {
statusbar: {
color:
'#f8285c'
},
toolbar: {
height:
44,
color:
'#f8285c'
},
title: {
color:
'#ffffffff',
showPageTitle:
true
},
backButton: {
image:
'back',
imagePressed:
'back_pressed',
align:
'left',
event:
'backPressed'
},
backButtonCanClose:
true
};
new
ThemeableBrowser(
'http://write.blog.csdn.net/postedit',
'_blank',
options);
}
}