ERROR TypeError: control.registerOnChange is not a function in html code
<form [formGroup]="editRoleForm" (ngSubmit)="onEditRole()" class="col s12" materialize>
<div class="row">
<select multiple formControlName="sp_id" id="permission_id" materialize="material_select" [materializeSelectOptions]="permissions"> // in this part ERROR TypeError: control.registerOnChange is not a function
<option value="" disabled selected>Select Permissions</option>
<option *ngFor="let permission of permissions" [value]="permission.permission_id">{{permission.permissin_desc}}</option>
</select>
</div>
</form>
my ts code:
'sp_id': this.fb.array([]),
this.role.permissions.forEach(x => {
(<FormArray>this.editRoleForm.get('sp_id')).push(new FormControl(x.permission_id))
});
Can you suggest me what is the problem please?
I want to show like this example:

Thank you!