seems to be working like this
This commit is contained in:
30
tools/app/angular-tour-of-heroes/src/electron-app.js
vendored
Normal file
30
tools/app/angular-tour-of-heroes/src/electron-app.js
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
const { create } = require('domain')
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
|
||||
let mainWindow
|
||||
function createWindow() {
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
autoHideMenuBar: false
|
||||
})
|
||||
mainWindow.loadURL('file://' + __dirname + '/angular-tour-of-heroes/index.html')
|
||||
mainWindow.webContents.openDevTools()
|
||||
mainWindow.on('closed', () => {
|
||||
mainWindow = null
|
||||
})
|
||||
}
|
||||
|
||||
app.on('ready', createWindow)
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
if (mainWindow === null) {
|
||||
createWindow()
|
||||
}
|
||||
})
|
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>AngularTourOfHeroes</title>
|
||||
<base href="/">
|
||||
<base href="./">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
|
Reference in New Issue
Block a user