title: Not allowed to load local resource error in electron - angular v7.0.1
body: <p>I'm trying to set up my application with Electron for the first time. The initial steps of adding main.js, changing the index.html, changing the package.json are done. While I try to run the application using the command <code>npm run electron-build</code>, I get a screen as below.</p>
  
  <p><a href="https://i.stack.imgur.com/eTKL5.png" rel="nofollow noreferrer">Error-while-running-electron-app</a></p>
  
  <p>I'm not able to run my application. It isn't an error basically, but just lack of information. Any help regarding this will be much appreciated. TIA.</p>
  
  <p><strong>main.js</strong></p>
  
  <pre><code>const { app, BrowserWindow } = require('electron')
  
  let win;
  
  function createWindow () {
    // Create the browser window.
    win = new BrowserWindow({
      width: 600, 
      height: 600,
      backgroundColor: '#ffffff',
      icon: `file://${__dirname}/dist/assets/logo.png`
    })
  
  
    win.loadURL(`file://${__dirname}/dist/index.html`)
  
    win.webContents.openDevTools()
  
    // Event when the window is closed.
    win.on('closed', function () {
      win = null
    })
  }
  
  // Create window on electron intialization
  app.on('ready', createWindow)
  
  // Quit when all windows are closed.
  app.on('window-all-closed', function () {
  
    // On macOS specific close process
    if (process.platform !== 'darwin') {
      app.quit()
    }
  })
  
  app.on('activate', function () {
    // macOS specific close process
    if (win === null) {
      createWindow()
    }
  })
  </code></pre>
  
  <p><strong>package.json</strong></p>
  
  <pre><code> "name": "angular-electron-first-app",
    "version": "0.0.0",
    "main": "main.js",
    "scripts": {
      "ng": "ng",
      "start": "electron .",
      "build": "ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e",
      "electron": "electron .",
      "electron-build": "ng build --prod &amp;&amp; npm run electron ."
    },
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;AngularElectron&lt;/title&gt;
    &lt;base href="./"&gt;
  
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="icon" type="image/x-icon" href="favicon.ico"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;app-root&gt;&lt;/app-root&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Other details:
  Angular v7.1.0
  RxJS v6.5.2
  NPM v6.5.0</p>