Problem with ngIf and event that changes the variable that is listened to

Hi, I have an angular application and got the following Error:

ERROR Error: "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: true'. Current value: 'ngIf: false'."

HTML code:

<p>Interface Type:</p>
<select [selectedIndex]="selType" #type (change)="onChangeType(type.options[type.selectedIndex].text)">
    <option *ngFor="let int of interfaces.getTypes()">{{int}}</option>
</select>

<div *ngIf="type.selectedIndex != -1">
    <p>Select Interface:</p>
    <select #selectedInt [selectedIndex]="selInterface"
        (change)="onChangeInterfaceSelection(selectedInt.selectedIndex)">
        <option *ngFor="let intf of allInterfaces">{{intf}}</option>
    </select>
</div>

<div>
    <button (click)="onSave()">Save</button>
    <button (click)="onCancel()">Cancel</button>
</div>

The error is occuring in the line with the *ngIf Directive.
The corresponding TS-File:

import { Component, OnInit } from '@angular/core';
import { InterfaceSelectionsService } from '../interface-selections.service';
import { AvailableInterfacesService } from '../available-interfaces.service';
import { InterfaceSelection } from '../interface-selection';
import { Router } from '@angular/router';

@Component({
  selector: 'app-interface-selection',
  templateUrl: './interface-selection.component.html',
  styleUrls: ['./interface-selection.component.scss']
})
export class InterfaceSelectionComponent implements OnInit {

  public allInterfaces: string[] = [];
  public selType: number = 0;
  public selInterface: number = 0;

  constructor(private selectedInterface: InterfaceSelectionsService, private interfaces: AvailableInterfacesService, private router: Router) {
  }

  ngOnInit() {
    //Laden aller Interfaces für den ausgewählten Typ
    if (this.selectedInterface.getInterface() == null) {
      this.selType = 0;
      this.onChangeType(this.interfaces.getTypes()[0]);
      this.selInterface = 0;
    } else {
      this.selType = this.interfaces.getTypes().indexOf(this.selectedInterface.getInterface().getType());
      this.onChangeType(this.interfaces.getTypes()[this.selType]);
      this.selInterface = this.interfaces.getAllInterfacesOfType(this.interfaces.getTypes[this.selType]).indexOf(this.selectedInterface.getInterface().getStart());
    }
  }

  public onChangeType(type: string) {
    this.selType = this.allInterfaces.indexOf(type);
    this.allInterfaces = this.interfaces.getAllInterfacesOfType(type);
  }

  public onChangeInterfaceSelection(ind: number): void {
    this.selInterface = ind;
  }

  public onSave() {
    this.selectedInterface.setInterface(new InterfaceSelection(this.allInterfaces[this.selInterface], this.allInterfaces[this.selInterface]));
    this.router.navigate(["./interfaces"]);
  }

  public onCancel() {
    this.router.navigate(["./interfaces"]);
  }
}

Does anyone know a fix for this problem? I did not find an acceptable solution in the internet since this is an error that does not seem to be very common.