我遇到了与本文中描述的相同的问题,诊断"请求超时"HttpExceptions.我按照建议打开了失败的请求跟踪,并且正在与MS的某个人合作(虽然它很慢).
原始帖子一年多没有更新,所以我想知道是否找到了修复程序,或者你是否只是忽略了这些错误.
任何帮助,将不胜感激.
我有一个登录组件如下:
import { Component, OnInit } from '@angular/core';
import { MdDialogRef } from '@angular/material';
import { AuthService } from '../../core/services/auth.service';
@Component({
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginDialogComponent implements OnInit {
model: {
email: string,
password: string
};
error;
constructor(
private authService: AuthService,
private dialogRef: MdDialogRef<LoginDialogComponent>
) { }
ngOnInit() {
this.model = {
email: '',
password: ''
};
}
signin() {
this.error = null;
this.authService.login(this.model.email, this.model.password).subscribe(data => {
this.dialogRef.close(data);
}, err => {
this.error = err.json();
});
} …Run Code Online (Sandbox Code Playgroud)