I am building a project based on Angular7.
I have started from the ngx-admin
empty starter-kit
branch:
https://github.com/akveo/ngx-admin/tree/starter-kit
Sometimes, during the development, I make mistakes, so the console should blame me for this, but only once. But at the moment it hangs the browser for some 20 secs and then prints more than 1500 errors.
how it looks like:
I am using a property of an undefined variable.
So, I see error:
But then I see another error, appering too many times.
I haven't found any cumstom error handlers enabled for this, so I don't know how to fix this issue.
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;
}