I would like to add a dynamic search form functionality to my ember app. What is best practice? It seems to me that using request parameters is not a recommended approach, but then how?
I would imagine I could do something like the following in my routes?
But what if the search is made up of a collection of drop-down selections or similar input controls (like a form) or not just a text search? For such a search, one or more of these search filters may be active for a given search operation. LEt’s say I have 1-3 search filters. Would this be the way to go?
Or if I have only 2 filters active?
I assume that the first matching route is executed, so I could do:
posts/search/:search1/ posts/search/:search1/:search2 posts/search/:search1/:search2/:search3
But this still seems like repitition and anti-pattern.
Would I simply have a
posts/search route and then manually extract the request params from the request in my router (handler)? Does this even work with the
/#/ hash routing?