Improving the navigation by moving it all to a service, adding a generic icon

This commit is contained in:
Will Marshall
2014-03-28 12:15:08 +11:00
parent 12b1a1b0e9
commit e1465352d0
16 changed files with 91 additions and 27 deletions

View File

@@ -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)