From 87ba4b4d32a6382c0ee56534418655f665279dd4 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 8 Apr 2018 19:18:36 +0200 Subject: [PATCH] docs(browser-tab): improve example --- .../plugins/browser-tab/index.ts | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/@ionic-native/plugins/browser-tab/index.ts b/src/@ionic-native/plugins/browser-tab/index.ts index d41848c07..f65c6c7b6 100644 --- a/src/@ionic-native/plugins/browser-tab/index.ts +++ b/src/@ionic-native/plugins/browser-tab/index.ts @@ -1,5 +1,5 @@ -import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; import { Injectable } from '@angular/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; /** * @name Browser Tab @@ -13,21 +13,13 @@ import { Injectable } from '@angular/core'; * constructor(private browserTab: BrowserTab) { * * browserTab.isAvailable() - * .then((isAvailable: boolean) => { - * + * .then(isAvailable => { * if (isAvailable) { - * * browserTab.openUrl('https://ionic.io'); - * * } else { - * * // open URL with InAppBrowser instead or SafariViewController - * * } - * * }); - * - * * } * * ``` @@ -41,13 +33,14 @@ import { Injectable } from '@angular/core'; }) @Injectable() export class BrowserTab extends IonicNativePlugin { - /** * Check if BrowserTab option is available * @return {Promise} Returns a promise that resolves when check is successful and returns true or false */ @Cordova() - isAvailable(): Promise { return; } + isAvailable(): Promise { + return; + } /** * Opens the provided URL using a browser tab @@ -55,12 +48,16 @@ export class BrowserTab extends IonicNativePlugin { * @return {Promise} Returns a promise that resolves when check open was successful */ @Cordova() - openUrl(url: string): Promise { return; } + openUrl(url: string): Promise { + return; + } /** * Closes browser tab * @return {Promise} Returns a promise that resolves when close was finished */ @Cordova() - close(): Promise { return; } + close(): Promise { + return; + } }