- 文档- 开始使用 
- TokenService 
- 获取Token 
- 常见问题 
- 存储Token 
- 发送Token 
- 路由守卫 
 
在调用请求时,加上 ALLOW_ANONYMOUS。
this.http.post(`login`, {
 name: 'cipchk', pwd: '123456'
}, null, {
 context: new HttpContext().set(ALLOW_ANONYMOUS, true)
});// 利用订阅 Error
this.http.get('/user').subscribe(
  res => console.log('success', res),
  err => console.error('error', err)
);
// 或使用 catchError
this.http.get('/user').pipe(
  catchError(err => {
    console.error('error', err);
    return of({});
  })
).subscribe();