2018年4月5日

angular5 HttpInterceptor使用

摘要: HttpInterceptor接口是ng的http请求拦截器,当需要拦截http请求,可以实现该接口。 1.创建HttpInterceptor 的实现类,并使用@Injectable()注解 2.在app.module中配置 如下所示: 其中,multi: true表示可以使用相同的Token去注册 阅读全文

posted @ 2018-04-05 00:16 jec 阅读(340) 评论(0) 推荐(0) 编辑

导航