title: Angular 2 App not loading, and there's not error
body: <p>My Angular2 App has been working. Not sure what I did, it's now getting stuck at loading, and there's no error message. When I use FireFox, it pops up a Warning: Unresponsive Script </p>
  
  <p>"A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.</p>
  
  <p>Script: <a href="http://10.60.3.12/polyfills.8ee51304bf305725cfc5.bundle.js:36" rel="nofollow noreferrer">http://10.60.3.12/polyfills.8ee51304bf305725cfc5.bundle.js:36</a>"</p>
  
  <p>I have been sitting here all day trying to find the problem. I use angular-cli created a new project, and manually copied my source files into the new project folder. It compiles successfully, but the app just won't load.</p>
  
  <p>Any help would be much appreciated!</p>
  
  <p>Thank you! </p>
  
  <p><strong>Edit: This is when I run local dev mode. It compiles successfully</strong></p>
  
  <pre><code>Titan:sumo-app eric$ ng serve
  ** NG Live Development Server is running on http://localhost:4200 **
  Hash: 840cec4b0f63776f7cf8                                                    - Time: 11228ms
  chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 158 kB {4} [initial] [rendered]
  chunk    {1} main.bundle.js, main.bundle.js.map (main) 183 kB {3} [initial] [rendered]
  chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 10.4 kB {4} [initial] [rendered]
  chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.19 MB [initial] [rendered]
  chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
  webpack: Compiled successfully.
  </code></pre>
  
  <p>I also made some screen shots when I go to localhost with FireFox. The first screen shot is where it gets stuck. My laptop fan starts spinning and getting loud when it gets stuck here. The Second screen shot shows some error 304 from the inspector.</p>
  
  <p><a href="https://i.stack.imgur.com/NfxIY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NfxIY.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/VwR5G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VwR5G.png" alt="enter image description here"></a></p>
  
  <p><strong>Edit: This code below is causing all the problem. I use this to check if the a user is logged in or if the token is expired. I don't understand how this code is causing the app not loading.</strong></p>
  
  <pre><code>    loggedIn(){
  
      let expiration = new Date(JSON.parse(localStorage.getItem('expiration')))
      let now = new Date()
      let t = localStorage.getItem('token')
      if (t == null || expiration == null) { 
          this.logout()
          return false 
      }
       let u = localStorage.getItem('currentUser')
          if (u != null){
              this.user = JSON.parse(localStorage.getItem('currentUser'))
          }else {
              this.logout()
              return false
          }
      if (now &gt; expiration ){
          this.logout()
          return false
      }
  
      return true;
  
  }
  </code></pre>