Add objectParam
Airblader opened this issue · 3 comments
What's your idea?
We have stringParam, booleanParam etc. It would be good to add objectParam
which by default uses JSON stringify/parse for (de-)serialization.
But how would that be represented in URL? http://my-site.com/index.html?objParam={a:1,b:2}
?
Yeah, plus any URL encoding that is done to it. This may seem odd – and for me it is – but the Angular router does JSON stringify by default for query parameters when necessary while ngqp requires an explicit serializer.
I think we don't need to be opionated here given how trivial supporting this would be. :-)
I've somewhat changed my mind, for now anyway. For this to be useful and "complete" we would have to provide a smarter compareWith function, but I would sort of like to avoid being opionated about its implementation. So I'll close this for now.