当我发送http get请求时,我收到这些错误TypeError: Found non-callable @@iterator,但它Angular 7不在Angular 8.
我的组件文件
从component.ts文件中我调用了服务getCodes()
onSubmit(){
this.service.getCodes('localhost/Aggregator/getCodes').subscribe (result=>{
}, error =>{
console.log(error);
})
}
Run Code Online (Sandbox Code Playgroud)
我的拦截器文件
当我发送请求时,我已经通过拦截器传递了这些标头
@Injectable()
export class Interceptor implements HttpInterceptor {
sessionParam:any = {
userParam: {
'a':66,
'b':101,
'c':'0201',
'd':'Y',
'e':'Y',
'h':'2019/02/22',
'f':'Y',
'g':12
}
}
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
let headers = new HttpHeaders();
for (var val in this.sessionParam) {
Object.keys(this.sessionParam[val]).forEach(key => {
headers = headers.append(key,this.sessionParam[val][key]);
});
}
request = …Run Code Online (Sandbox Code Playgroud) 我已经安装了Angular 6项目。我正在尝试运行,ng build --prod但出现错误
找不到模块:错误:无法解析“ c:\ localpath”中的“ core-js / es7 / reflect”
我收到此错误Angular 6 CLI版本。