Reputation: 375
I have route.attr:
can.route.attr({type:"list",id:"list",val:""})
location.hash -> "#!update/edit&val=113"
how can I change this to #!list/list and destroy val:"" in url
i use this : can.route.attr({type:"list",id:"list",val:null})
location.hash -> "#!update/edit&val="
Upvotes: 0
Views: 116
Reputation: 611
Much like other can.Map
s, completely removing a key from can.route
requires using can.route.removeAttr("val")
. Try it; you should see &val=
disappear from the hash entirely.
Upvotes: 1