Get route properties in specified order

This commit is contained in:
Vit Brunner
2014-12-22 11:15:01 +01:00
parent 58125426a3
commit c3b6f377e3
2 changed files with 17 additions and 10 deletions
+5 -3
View File
@@ -29,9 +29,11 @@ angular.module("sideBySide").service "route", ['$location', ($location) ->
value
@get = () ->
(property + ':' + getValue(value) \
for property, value of @params when value)
.join('/')
['base', 'display', 'section']
.filter (key) => @params[key]
.map (key) =>
key + ':' + getValue @params[key]
.join('/')
@update = (key, value) ->
@params[key] = value