mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-23 13:50:24 +08:00
Make base configurable again
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
angular.module("sideBySide.controllers", [])
|
||||
.controller "AppController", [
|
||||
'$routeParams', '$scope'
|
||||
($routeParams, $scope) ->
|
||||
$scope.$on "$routeChangeSuccess", ($currentRoute, $previousRoute) ->
|
||||
$scope.base = if $previousRoute.params.base \
|
||||
then '/' + $previousRoute.params.base
|
||||
else ''
|
||||
]
|
||||
|
||||
.controller "ComparisonController", [
|
||||
'$routeParams', '$q', '$scope', 'fetch', 'transformer'
|
||||
($routeParams, $q, $scope, fetch, transformer) ->
|
||||
@@ -20,8 +29,8 @@ angular.module("sideBySide.controllers", [])
|
||||
)
|
||||
)
|
||||
|
||||
config = if $routeParams.config \
|
||||
then $routeParams.config.replace(/\./g, '/') \
|
||||
config = if $routeParams.base \
|
||||
then $routeParams.base.replace(/\./g, '/') \
|
||||
else ''
|
||||
|
||||
update(config + "/config.json")
|
||||
|
||||
Reference in New Issue
Block a user