Fix: Do not use hashbang URLs.
* Links from firmware where broken. * Redirect hashbang URLs to normal ones for compatibility.
This commit is contained in:
parent
49e7f7703c
commit
f413ee9741
|
@ -8,8 +8,10 @@ angular.module('ffffng', [
|
||||||
'templates-main',
|
'templates-main',
|
||||||
'ui.bootstrap'
|
'ui.bootstrap'
|
||||||
])
|
])
|
||||||
.config(function ($logProvider, $routeProvider) {
|
.config(function ($logProvider, $locationProvider, $routeProvider) {
|
||||||
$logProvider.debugEnabled(false);
|
$logProvider.debugEnabled(false);
|
||||||
|
$locationProvider.hashPrefix('');
|
||||||
|
$locationProvider.html5Mode(false);
|
||||||
$routeProvider
|
$routeProvider
|
||||||
.when('/', {
|
.when('/', {
|
||||||
templateUrl: 'views/main.html',
|
templateUrl: 'views/main.html',
|
||||||
|
@ -42,7 +44,13 @@ angular.module('ffffng', [
|
||||||
title: 'Versand von Status-E-Mails deaktivieren'
|
title: 'Versand von Status-E-Mails deaktivieren'
|
||||||
})
|
})
|
||||||
.otherwise({
|
.otherwise({
|
||||||
redirectTo: '/'
|
resolveRedirectTo: function ($location) {
|
||||||
|
var url = $location.url();
|
||||||
|
if (url.startsWith('/!/')) {
|
||||||
|
return url.substring(3);
|
||||||
|
}
|
||||||
|
return '/';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.service('Navigator', function ($location) {
|
.service('Navigator', function ($location) {
|
||||||
|
|
Loading…
Reference in a new issue