mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
fix(indexappcontent): Return observable for onItemPressed (#2006)
This commit is contained in:
parent
03f578909b
commit
9a5211001f
@ -1,5 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
import { Plugin, Cordova, CordovaFunctionOverride, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface IndexItem {
|
export interface IndexItem {
|
||||||
domain: string;
|
domain: string;
|
||||||
@ -95,11 +96,10 @@ export class IndexAppContent extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* If user taps on a search result in spotlight then the app will be launched.
|
* If user taps on a search result in spotlight then the app will be launched.
|
||||||
* You can register a Javascript handler to get informed when this happens.
|
* You can register a Javascript handler to get informed when this happens.
|
||||||
* @param {IndexItem} Clicked Item
|
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
|
||||||
* @return {Promise<any>} Returns promise
|
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@CordovaFunctionOverride()
|
||||||
onItemPressed(payload: IndexItem) {
|
onItemPressed(): Observable<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user