Use html5 pushstate

This commit is contained in:
Vit Brunner
2014-12-16 21:59:47 +01:00
parent 998254be24
commit 6629562e6e
2 changed files with 12 additions and 5 deletions
+6 -1
View File
@@ -10,8 +10,13 @@ angular.module("sideBySide").service "route", ['$location', ($location) ->
, {})
@params.base = '' if 'base' not of @params
@params.base = @params.base.replace(/\./g, '/')
@appUrl = $location.absUrl()
.substring(0, $location.absUrl().length - $location.url().length)
@update = (key, value) ->
@params[key] = value
(property + ':' + value for property, value of @params).join('/')
@
]