Login(user: User) { return this.http.post('your url' + 'account/Login', user).subscribe( (data) => { }, (error) => { console.log(error); // get the status as error.status }) }