Hi Rahul,

Try this:
loginStatus: any;
dashboardStatus: any;
logoutStatus: any;

loginAndOut$ = this.http
.post('http://192.168.1.93:3000/login', {
username: 'someone',
password: '1234'
})
.pipe(
tap(result => console.log(result)), // log the response to console
tap(res => (this.loginStatus = res['msg'])),
flatMap(() =>
this.http.post('http://192.168.1.93:3000/dashboard', {
data: 'nothing'
})
),
tap(result => console.log(result)), // log the response to console
tap(res => (this.dashboardStatus = res['msg'])),
flatMap(() =>
this.http.post('http://192.168.1.93:3000/logout', { data: 'nothing' })
),
tap(result => console.log(result)), // log the response to console
tap(res => (this.logoutStatus = res['msg']))
);

subscription = this.loginAndOut$.subscribe(() => console.log('done'));

when you have done that, can you share the results from your browser dev 
console?

Regards
Sander



-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to