title: AngularJs With Electron Close Application Clear All localStorage
body: <p>I have create one application AngularJS &amp; Electron </p>
  
  <p>User Login successfully login i have set local Storage
  screen redirect to listing  page.</p>
  
  <p>then i application close and again running app but not login screen display, listing page display</p>
  
  <p>application close all localStorage remove</p>
  
  <p><a href="https://i.stack.imgur.com/cy4J7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cy4J7.png" alt="enter image description here"></a></p>
  
  <p>main.js</p>
  
  <pre><code>mainWindow.on('closed', function () {
      mainWindow = null
    })
  }
  app.on('ready', createWindow)
  
  
  app.on('window-all-closed', function () {
    if (process.platform !== 'darwin') {
      app.quit()
    }
  })
  
  app.on('activate', function () {
    if (mainWindow === null) {
      createWindow()
    }
  })
  </code></pre>
  
  <p>Local Storge</p>
  
  <p>User Login Successfully set localStorge</p>
  
  <pre><code> localStorage.setItem('username', user.username);
   localStorage.setItem('password', user.password);
  </code></pre>