Created
December 3, 2015 05:28
-
-
Save mackenziestarr/121723cf53bf9451ee14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// when updating the location path with search parameters | |
// add '?' to the path then serialize | |
Backbone.history.root = window.location.pathname + '?'; | |
query = {"q":"Great Expectations"}; | |
var url = $.param(query); | |
Backbone.history.navigate(url, {replace:true}); | |
// localhost:8000/some/path?q=Great&20%Expectations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment