node.js - Angular 2 http request is giving pending/cancelled status on new system -


i'm sending http request following

this.http.post('/api/login', body)       .subscribe(         response => {                    ...                   },                error=> {                    ...                   }); 

but in new systems gives pending after gots cancelled sometimes.

after loading 1 time never happens on system again , works fine. i'm redirecting client routes index.html. follows:

app.get(['/', '/login', '/dashboard'],function(req, res, next){                     res.sendfile(path.join(__dirname,'/../public/index.html'));                 }); 

where '/', '/login', '/dashboard' routes @ client end. follows:

@routeconfig([   { path: '/', redirectto: ['/dashboard'] },   { path: '/login', component: login, as: 'login' },   { path: '/dashboard', component: dashboard, as: 'dashboard' } ]) 


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -