disable html5 if running in electron
This commit is contained in:
@@ -20,16 +20,18 @@ angular.module('app.frontend')
|
|||||||
// Default fall back route
|
// Default fall back route
|
||||||
$urlRouterProvider.otherwise(function($injector, $location){
|
$urlRouterProvider.otherwise(function($injector, $location){
|
||||||
var state = $injector.get('$state');
|
var state = $injector.get('$state');
|
||||||
console.log("fallback");
|
|
||||||
state.go('home');
|
state.go('home');
|
||||||
return $location.path();
|
return $location.path();
|
||||||
});
|
});
|
||||||
|
|
||||||
if(window.history && window.history.pushState) {
|
var runningInElectron = process.versions['electron'];
|
||||||
$locationProvider.html5Mode({
|
if(!runningInElectron) {
|
||||||
enabled: true,
|
if (window.history && window.history.pushState) {
|
||||||
requireBase: false
|
$locationProvider.html5Mode({
|
||||||
});
|
enabled: true,
|
||||||
|
requireBase: false
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user