saveStudentDetails(values) {
const studentData = {};
studentData['id'] = values.id;
studentData['password'] = values.password;
this.crudService.loginstudent(studentData).subscribe(result => {
// Here should be the value of the header from backend to be store on localstorage
this.toastr.success('You are logged in', 'Success !', { positionClass: 'toast-bottom-right' });
this.router.navigate(['/address']);
},
err => {
console.log('status code ->' + err.status);
this.toastr.error('Please try again', 'Error !', { positionClass: 'toast-bottom-right' });
});

У меня есть токен JWT, который был установлен в заголовке авторизации, когда пользователь вошел в систему, как я могу получить токен из заголовка авторизации и поместить токен в localalstorage, чтобы я мог передать токен jwt другие маршруты тоже? Большое спасибо.