Open DIST Urls

Asked

Viewed 31 times

0

I’m having a problem when I build the project with Electron to call an UPDATE screen of the project in Angular since dist do has index.html, in the development mode managed to call quiet.

mainWindow.loadURL('http://localhost:4200/#update');

in the development mode I can call that.

    mainWindow.loadURL(url.format({
       pathname: path.join(__dirname, 'dist/index.html/#update'),
       protocol: 'file:',
       slashes: true
    }));

when I build the project I cannot call the screen of the following error. inserir a descrição da imagem aqui

1 answer

0


mainWindow.loadURL('file://' + __dirname + '/dist/index.html#/update');

this way I managed to solve the problem

Browser other questions tagged

You are not signed in. Login or sign up in order to post.