mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-03 02:21:33 +00:00
Adding handling of 'current hub'
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
Darkswarm.controller "HubNodeCtrl", ($scope, Navigation, $location, $anchorScroll, $templateCache) ->
|
||||
Darkswarm.controller "HubNodeCtrl", ($scope, Navigation, $location, $anchorScroll, $templateCache, CurrentHub) ->
|
||||
$scope.toggle = ->
|
||||
Navigation.navigate $scope.hub.path
|
||||
|
||||
$scope.open = ->
|
||||
$location.path() == $scope.hub.path
|
||||
|
||||
$scope.current = ->
|
||||
$scope.hub.id is CurrentHub.id
|
||||
|
||||
if $scope.open()
|
||||
$anchorScroll()
|
||||
|
||||
Reference in New Issue
Block a user