Angular 2 App not loading, and there's not error -
my angular2 app has been working. not sure did, it's getting stuck @ loading, , there's no error message. when use firefox, pops warning: unresponsive script
"a script on page may busy, or may have stopped responding. can stop script now, open script in debugger, or let script continue.
script: http://10.60.3.12/polyfills.8ee51304bf305725cfc5.bundle.js:36"
i have been sitting here day trying find problem. use angular-cli created new project, , manually copied source files new project folder. compiles successfully, app won't load.
any appreciated!
thank you!
edit: when run local dev mode. compiles successfully
titan:sumo-app eric$ ng serve ** ng live development server 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. i made screen shots when go localhost firefox. first screen shot gets stuck. laptop fan starts spinning , getting loud when gets stuck here. second screen shot shows error 304 inspector.
edit: code below causing problem. use check if user logged in or if token expired. don't understand how code causing app not loading.
loggedin(){ let expiration = new date(json.parse(localstorage.getitem('expiration'))) let = 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 > expiration ){ this.logout() return false } return true; }


Comments
Post a Comment