Need help upgrading to Ionic Framework 4.0? Get assistance with our Enterprise Migration Services EXPLORE NOW

Colored Browser Tabs

Improve this doc

This plugin opens Chrome Custom Tabs on Android or SafariViewController on iOS

Repo: https://github.com/TobyEb/cordova-plugin-colored-browser-tabs

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add cordova-plugin-colored-browser-tabs
    $ npm install --save @ionic-native/colored-browser-tabs@4
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { ColoredBrowserTabs } from '@ionic-native/colored-browser-tabs';


constructor(private browserTabs: ColoredBrowserTabs) { }

...


this.browserTabs.openTab('www.example.url', '#ffffff')
  .subscribe()

this.browserTabs.openTabWithAnimation('www.example.url', 'slide_x', '#ffffff')
  .subscribe()

Instance Members

openTab(url, color)

Call this method to open the tab

Param Type Details
url

the url you want to open

color

the color with which you want to define the toolbar color

Returns: Observable<any> Returns a Observable that resolves when something happens

openTabWithAnimation(url, anim, color)

Call this method to open the tab

Param Type Details
url

the url you want to open

anim

the animation you want for enter and exit, you can choose between slide_x / slide_y and fade only works in Android, iOS just shows the default animation

color

the color with which you want to define the toolbar color

Returns: Observable<any> Returns a Observable that resolves when something happens

API

Native

General