expose parse/build querystring
This commit is contained in:
parent
8cbe2dd193
commit
6531e3c363
3 changed files with 41 additions and 35 deletions
|
|
@ -924,7 +924,6 @@ var redrawService = function() {
|
|||
}
|
||||
return {subscribe: callbacks.push.bind(callbacks), unsubscribe: unsubscribe, publish: publish}
|
||||
}()
|
||||
requestService.setCompletionCallback(redrawService.publish)
|
||||
var parseQueryString = function(string) {
|
||||
if (string === "" || string == null) return {}
|
||||
if (string.charAt(0) === "?") string = string.slice(1)
|
||||
|
|
@ -962,6 +961,7 @@ var parseQueryString = function(string) {
|
|||
}
|
||||
return data
|
||||
}
|
||||
requestService.setCompletionCallback(redrawService.publish)
|
||||
var coreRouter = function($window) {
|
||||
var supportsPushState = typeof $window.history.pushState === "function"
|
||||
var callAsync = typeof setImmediate === "function" ? setImmediate : setTimeout
|
||||
|
|
@ -1149,6 +1149,8 @@ m.render = renderService.render
|
|||
m.redraw = redrawService.publish
|
||||
m.request = requestService.request
|
||||
m.jsonp = requestService.jsonp
|
||||
m.parseQueryString = parseQueryString
|
||||
m.buildQueryString = buildQueryString
|
||||
m.version = "1.0.0"
|
||||
if (typeof module !== "undefined") module["exports"] = m
|
||||
else window.m = m
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue