mardi 5 juin 2018

How to make testing for function thatë populate forms

I need to test this function. Can you ask me how to write the script?

 populateFormAlarm() {
    this.activatedRoute.params.subscribe(
        params => {
            this.as.AlarmTypeGetById(params['id']).subscribe(
                alarm => {
                    this.alarm = alarm;
                    this.editAlarmsForm.controls['alarmnumber'].setValue(alarm.alarmnumber);
                    this.editAlarmsForm.controls['alarmdesc'].setValue(alarm.alarmdesc);
                }
            );
        }
    );
}

Aucun commentaire:

Enregistrer un commentaire