mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Simplify PagesetCtrl
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
Darkswarm.controller "PagesetCtrl", ($scope, $location) ->
|
||||
$scope.selected = ->
|
||||
path = $location.path()?.match(/^\/\w+$/)?[0]
|
||||
if path
|
||||
path[1..]
|
||||
else
|
||||
$scope.defaultPage
|
||||
$location.path()[1..] || $scope.defaultPage
|
||||
|
||||
$scope.selectDefault = (selection) ->
|
||||
$scope.defaultPage = selection
|
||||
|
||||
Reference in New Issue
Block a user