简体   繁体   中英

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.

在此处输入图片说明

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,
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM