mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-25 05:45:15 +00:00
Improving the navigation by moving it all to a service, adding a generic icon
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
Darkswarm.factory 'Navigation', ($location) ->
|
||||
new class Navigation
|
||||
paths: []
|
||||
path: null
|
||||
|
||||
navigate: (path = false)->
|
||||
@path = path || @path || @paths[0]
|
||||
|
||||
if $location.path() == @path
|
||||
$location.path("/")
|
||||
else
|
||||
$location.path(@path)
|
||||
Reference in New Issue
Block a user