Graeme Paul
Graeme Paul

Reputation: 1153

webpack-dev-server electron angular 1.6.1 hot reload blank screen

Im currently learning Electron, I created a simple app in Angular with webpack to livereload. However on hot reload the app loads a blank view, *see screenshot below, and I have to restart electron to get it back. I have done a similar app in React, and it works fine.

I put the code up on a repo https://github.com/graemec23/Favourite-places-ng1

I would be grateful for any advice.

enter image description here

Upvotes: 1

Views: 471

Answers (1)

Graeme Paul
Graeme Paul

Reputation: 1153

It turns out the issue was because of html5Mode in Angular ui-router, it requires a server and does not work on file:// protocol. Setting enabled to false solved it.

$locationProvider.html5Mode({
  enabled: false,
  requireBase: false,
});

Upvotes: 1

Related Questions