angular – Reset all drop-down menus mutliselect

I'm using the "ng-multiselect-dropdown" package in Angular and I want to reset all the fields.
I've created a button with a click function to reset all fields.

See the code:

Further information

Typed code:

resetForm (form?: NgForm) {
if (form! = null)
form.form.reset ();

this.service.formData = {
idCursus: 0,
entitledCursus: & # 39;
resumeCursus: "
goalCursus: ",
evaluationCursus: & # 39;
publicCursus: & # 39;;
sanctionCursus: &
idLms: & # 39; & # 39;
}
}

I have tried to reset the property of the selected items but it does not work.
I've added this line in the "resetForm" function.

this.selectedItemsPrerequis = [];

Thank you for your help.