mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Making sure that we have a .path() in HashNavigation
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
Darkswarm.factory 'HashNavigation', ($location) ->
|
||||
new class HashNavigation
|
||||
hash: null
|
||||
hash: null
|
||||
|
||||
constructor: ->
|
||||
# Make sure we have a path as hashes
|
||||
# dont seem to work so well without them
|
||||
$location.path("") if !$location.path()
|
||||
|
||||
active: (hash)->
|
||||
$location.hash() == hash
|
||||
$location.hash() == hash
|
||||
|
||||
navigate: (hash)->
|
||||
@hash = hash
|
||||
|
||||
Reference in New Issue
Block a user