Better handling of the home page hubs

This commit is contained in:
Will Marshall
2014-04-23 12:58:34 +10:00
parent c5f8e2e123
commit f5b32ebd3f
5 changed files with 25 additions and 11 deletions

View File

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