mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-25 01:23:23 +00:00
Better handling of the home page hubs
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
Darkswarm.controller "HubNodeCtrl", ($scope, Navigation, $location, $anchorScroll) ->
|
||||
$scope.toggle = ->
|
||||
Navigation.navigate $scope.hub.path
|
||||
|
||||
$scope.active = ->
|
||||
$location.path() == $scope.hub.path
|
||||
|
||||
if $scope.active()
|
||||
console.log "scrolling baby"
|
||||
$anchorScroll()
|
||||
|
||||
Reference in New Issue
Block a user