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

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -