我正在基于Angular7建立一个项目。
我从ngx-admin
空的starter-kit
分支开始:
https://github.com/akveo/ngx-admin/tree/starter-kit
有时候,在开发过程中,我会犯错误,因此控制台应该为此怪我,但只能怪我一次。但是目前,它使浏览器挂起了20秒钟,然后打印了1500多个错误。
外观如何:
我正在使用未定义变量的属性。
所以,我看到了错误:
但是然后我看到另一个错误,重复了很多次。
我还没有找到为此启用的任何cumstom错误处理程序,所以我不知道如何解决此问题。
protected createPositions(memberPositions?: number[]) {
return this.fb.group(
positions.map(position => {
return this.fb.control(!!~memberPositions.indexOf(position.id));
}),
{ validator: requireCheckedValidator(1) }
);
}
get formPositions() {
return this.form.get('positions') as any;
}
get formCheckboxes() {
const arr = [];
Object.keys(this.formPositions.controls).forEach(key => {
arr.push(this.formPositions.controls[key]);
});
return arr;
}