import { Injectable } from '@angular/core' ; import 'rxjs/add/operator/map' ; import { ThemeableBrowser } from 'ionic-native' ; import { Constant } from '../constant/constant' ; @ Injectable ( ) export class Browser { target : string = '_blank' ; private options : any = { statusbar : { color : this . constant . colors_primary } , toolbar : { height : 44 , color : this . constant . colors_primary } , title : { color : this . constant . colors_light , showPageTitle : true } , backButton : { image : 'back' , imagePressed : 'back_pressed' , align : 'left' , event : 'backPressed' } , backButtonCanClose : true } ; constructor ( public constant ) { } launch ( url ) { return new ThemeableBrowser ( url , this . target , this . options ) ; } launchWithTaget ( url , target ) { this . target = target ; return this . launch ( url ) ; } }