Deep Links and Query Parameters


#1

When using the ionic deeplinks plugin I can match to a path with a single parameter successfully so

this.deeplinks.route({
’/:tibowId’: PageTibow

will work fine.

However I cannot get a path with a query string to work. I’m trying to match to

/api/foo?p1=value&p2=value

but cannot get the match string right.

Any ideas?


#2

I would match just /api/foo and then use the $args property of the match object to pull the query parameters.


#3

Thanks rapropos. I’ve tried that though, and just matching to one parameter
with the intention of getting the second through $args but it still doesn’t
successfully match.

I’m flying a bit blind as I can’t debug the match on my device and
deeplinks won’t work on ionic serve.


#4

This sounds fishy. Are you trying to mix path and query parameters? That may not work. Can you see if you can get all the query parameters if the route is completely static (i.e. no path parameters)?


#5

Robert, great, thanks. I genuinely thought I had tried that but apparently
not properly.
Matching to the static path api/foo when the actual link is
api/foo?p1=value&p2=value

does the trick and both the params are available through $args.

Thanks again


#7

this plugin is deprecated…