mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
docs(deeplinks): improve docs (#880)
The routeWithNavController method returns an observable, thus it has to be subscribed to, to get it working. Change the documentation of the method to show that we need to subscribe to the observable, just like when using the route method.
This commit is contained in:
parent
700fb47b73
commit
3a11d290e5
@ -53,7 +53,15 @@ export interface DeeplinkMatch {
|
||||
* Deeplinks.routeWithNavController(this.navController, {
|
||||
'/about-us': AboutPage,
|
||||
'/products/:productId': ProductPage
|
||||
});
|
||||
}).subscribe((match) => {
|
||||
// match.$route - the route we matched, which is the matched entry from the arguments to route()
|
||||
// match.$args - the args passed in the link
|
||||
// match.$link - the full link data
|
||||
console.log('Successfully matched route', match);
|
||||
}, (nomatch) => {
|
||||
// nomatch.$link - the full link data
|
||||
console.error('Got a deeplink that didn\'t match', nomatch);
|
||||
});
|
||||
* ```
|
||||
*
|
||||
* See the [Ionic 2 Deeplinks Demo](https://github.com/driftyco/ionic2-deeplinks-demo/blob/master/app/app.ts) for an example of how to
|
||||
|
Loading…
Reference in New Issue
Block a user