hash support
This commit is contained in:
parent
20257e0875
commit
1d2f4b6e37
|
@ -28,7 +28,11 @@ route = ->
|
||||||
render 'body', 'info'
|
render 'body', 'info'
|
||||||
|
|
||||||
module.exports = ->
|
module.exports = ->
|
||||||
# Detect route changes.
|
# Do we have browser support?
|
||||||
window.addEventListener 'hashchange', route, no
|
if 'onhashchange' of window and 'hash' of window.location
|
||||||
# And route now.
|
# Detect route changes.
|
||||||
do route
|
window.addEventListener 'hashchange', route, no
|
||||||
|
# And route now.
|
||||||
|
return do route
|
||||||
|
|
||||||
|
render 'body', 'error', { text: 'URL fragment identifier not supported' }
|
Loading…
Reference in New Issue