前言:
the best way out is always through.
正文:
问题场景
问题定位
拦截器相关配置不对
出现原因之一:根组件已配置拦截器相关配置,在组件引用时,又重新provider一遍,导致出现这个问题
解决方案
将组件中ts文件中:
@Component({
selector: 'app-workspace-table',
templateUrl: './table.component.html',
styles: [],
providers: [InterceptorService] //去掉
})
结语:
the best preparation for tomorrow is doing your best today