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:
Renjith VK 2018-06-28 18:10:37 +05:30 committed by Daniel Sogl
parent 3ed896960e
commit 22ffb4914f

View File

@ -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);
* }); * });