From 55071c0d654cdfaef3689779bec6822662a054ca Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Wed, 17 May 2017 07:03:07 -0400 Subject: [PATCH] fix(printer): fix implementation and add pick method --- src/@ionic-native/plugins/printer/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/printer/index.ts b/src/@ionic-native/plugins/printer/index.ts index 3705703a5..e115f18b8 100644 --- a/src/@ionic-native/plugins/printer/index.ts +++ b/src/@ionic-native/plugins/printer/index.ts @@ -84,13 +84,22 @@ export class Printer extends IonicNativePlugin { @Cordova() isAvailable(): Promise { return; } + /** + * Displays a system interface allowing the user to select an available printer. To speak with a printer directly you need to know the network address by picking them before via `printer.pick`. + */ + @Cordova() + pick(): Promise { return; } + /** * Sends content to the printer. * @param content {string | HTMLElement} The content to print. Can be a URL or an HTML string. If a HTML DOM Object is provided, its innerHtml property value will be used. * @param options {PrintOptions} optional. The options to pass to the printer * @returns {Promise} */ - @Cordova() + @Cordova({ + successIndex: 2, + errorIndex: 4 + }) print(content: string | HTMLElement, options?: PrintOptions): Promise { return; } }