Skip to content

Commit

Permalink
fix(deeplinks): add options parameter(#1601) (#2141)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshith Kashyap authored and ihadeed committed Dec 2, 2017
1 parent 7255795 commit bb2291c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/@ionic-native/plugins/deeplinks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ export interface DeeplinkMatch {

}

export interface DeeplinkOptions {
/**
* Set the matched route as root page using `navCtrl.setRoot()` method.
*/
root: boolean;
}

/**
* @name Deeplinks
* @description This plugin handles deeplinks on iOS and Android for both custom URL scheme links
Expand Down Expand Up @@ -116,13 +123,15 @@ export class Deeplinks extends IonicNativePlugin {
* promise result which you can then use to navigate in the app as you see fit.
*
* @param {Object} paths
*
* @param {DeeplinkOptions} options
*
* @returns {Observable<DeeplinkMatch>} Returns an Observable that resolves each time a deeplink comes through, and
* errors if a deeplink comes through that does not match a given path.
*/
@Cordova({
observable: true
})
routeWithNavController(navController: any, paths: any): Observable<DeeplinkMatch> { return; }
routeWithNavController(navController: any, paths: any, options?: DeeplinkOptions): Observable<DeeplinkMatch> { return; }

}

0 comments on commit bb2291c

Please sign in to comment.