disable html5 if running in electron

This commit is contained in:
Mo Bitar
2017-01-15 12:41:57 -06:00
parent e51d1e3477
commit 8076009fb4

View File

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