Skip to Content
0
Oct 10, 2014 at 09:11 AM

Router: Pattern Matching with query string

299 Views

Hi,

the way I find it in the docs here (:query?:) does not work for me. Here is my config:

{

pattern : "my/pattern:query?:",

name : "MyView",

viewId : "MyView"

view : "my.view.MyView",

},

It does not end up in the attached routeMatched event handler with an url like http://something:8080/app/my/pattern/?foo=bar nor

http://something:8080/app/my/pattern?foo=bar

If I change the pattern to pattern : "my/pattern:?query:" I get ?query = { foo: "bar" }. so the variable name is kind of wired. If I try "my/pattern:query:" I get query = "?foo=bar". From what I got from the docs none of these behaviours (expect the last one which I am not looking for) is the intended behaviour.

What am I doing wrong?

BR

Chris