mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-15 07:31:03 +08:00
fix(safari-view-controller): show should return an Observable
BREAKING CHANGE: `show` method now returns an Observable closes #1619
This commit is contained in:
parent
71349655c0
commit
a6f9714422
@ -1,5 +1,6 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
export interface SafariViewControllerOptions {
|
||||
animated?: boolean;
|
||||
@ -74,13 +75,14 @@ export class SafariViewController extends IonicNativePlugin {
|
||||
/**
|
||||
* Shows Safari View Controller
|
||||
* @param options {SafariViewControllerOptions} optional
|
||||
* @returns {Promise<any>}
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2
|
||||
errorIndex: 2,
|
||||
observable: true
|
||||
})
|
||||
show(options?: SafariViewControllerOptions): Promise<any> { return; }
|
||||
show(options?: SafariViewControllerOptions): Observable<any> { return; }
|
||||
|
||||
/**
|
||||
* Hides Safari View Controller
|
||||
|
Loading…
x
Reference in New Issue
Block a user