mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
docs(deeplinks): update example (#2570)
If it has only one argument, then no need function brackets. It would decrease the readability of the source code snippets.
This commit is contained in:
parent
3ed896960e
commit
22ffb4914f
@ -45,12 +45,12 @@ export interface DeeplinkOptions {
|
|||||||
* '/about-us': AboutPage,
|
* '/about-us': AboutPage,
|
||||||
* '/universal-links-test': AboutPage,
|
* '/universal-links-test': AboutPage,
|
||||||
* '/products/:productId': ProductPage
|
* '/products/:productId': ProductPage
|
||||||
* }).subscribe((match) => {
|
* }).subscribe(match => {
|
||||||
* // match.$route - the route we matched, which is the matched entry from the arguments to route()
|
* // 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.$args - the args passed in the link
|
||||||
* // match.$link - the full link data
|
* // match.$link - the full link data
|
||||||
* console.log('Successfully matched route', match);
|
* console.log('Successfully matched route', match);
|
||||||
* }, (nomatch) => {
|
* }, nomatch => {
|
||||||
* // nomatch.$link - the full link data
|
* // nomatch.$link - the full link data
|
||||||
* console.error('Got a deeplink that didn\'t match', nomatch);
|
* console.error('Got a deeplink that didn\'t match', nomatch);
|
||||||
* });
|
* });
|
||||||
@ -63,12 +63,12 @@ export interface DeeplinkOptions {
|
|||||||
* this.deeplinks.routeWithNavController(this.navController, {
|
* this.deeplinks.routeWithNavController(this.navController, {
|
||||||
* '/about-us': AboutPage,
|
* '/about-us': AboutPage,
|
||||||
* '/products/:productId': ProductPage
|
* '/products/:productId': ProductPage
|
||||||
* }).subscribe((match) => {
|
* }).subscribe(match => {
|
||||||
* // match.$route - the route we matched, which is the matched entry from the arguments to route()
|
* // 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.$args - the args passed in the link
|
||||||
* // match.$link - the full link data
|
* // match.$link - the full link data
|
||||||
* console.log('Successfully matched route', match);
|
* console.log('Successfully matched route', match);
|
||||||
* }, (nomatch) => {
|
* }, nomatch => {
|
||||||
* // nomatch.$link - the full link data
|
* // nomatch.$link - the full link data
|
||||||
* console.error('Got a deeplink that didn\'t match', nomatch);
|
* console.error('Got a deeplink that didn\'t match', nomatch);
|
||||||
* });
|
* });
|
||||||
|
Loading…
Reference in New Issue
Block a user