mirror of
https://github.com/wassname/side-by-side.git
synced 2026-09-23 13:50:24 +08:00
Better config loading
This commit is contained in:
@@ -7,7 +7,15 @@ angular.module("sideBySide.controllers", [])
|
||||
then '/' + $previousRoute.params.base
|
||||
else ''
|
||||
|
||||
base = $location.url().replace(/\/(.*)\/.*/, '$1')
|
||||
appUrl = $location.absUrl()
|
||||
.substring(0, $location.absUrl().length - $location.url().length)
|
||||
.replace(/#$/, '')
|
||||
|
||||
base = appUrl + $location.url()
|
||||
.slice(1)
|
||||
.replace(/(.*)\/.*/, '$1')
|
||||
.replace(/\./g, '/')
|
||||
|
||||
poems.load base
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user