0

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:

enter image description here

But then I see another error, appering too many times.

enter image description here

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;
  }

enter image description here

Sergej
  • 2,030
  • 1
  • 18
  • 28

0 Answers0