-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathErrors.txt
More file actions
64 lines (51 loc) · 2.19 KB
/
Errors.txt
File metadata and controls
64 lines (51 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
ERROR Error: NG01052: formGroup expects a FormGroup instance. Please pass one in.
Example:
<div [formGroup]="myGroup">
<input formControlName="firstName">
</div>
In your class:
this.myGroup = new FormGroup({
firstName: new FormControl()
});
<!-- <div class="modal-body">
<form [formGroup]="medicineForm" >
<h2>Medicine Name</h2>
<div formArrayName="medicine_name">
<div *ngFor="let medicines of medicineNames.controls; let pointIndex=index" [formGroupName]="pointIndex">
<select formControlName="medicine_name">
<option disabled>Select Medicine</option>
<option>Choose medicine</option>
<option *ngFor="let medicine of medicineList">{{medicine.medicine_name}}</option>
</select>
<button type="button" (click)="deleteMedicineNames(pointIndex)">Delete Medicine </button>
</div>
<button type="button" (click)="addMedicineNames()">Add Medicine </button>
</div>
</form>
{{ this.medicineForm.value | json }}
<form [formGroup]="testForm">
<h2>Test Name</h2>
<div formArrayName="test_name">
<div *ngFor="let test of testNames.controls; let pointIndex=index" [formGroupName]="pointIndex">
<select formControlName="test">
<option disabled>Select Test</option>
<option>Choose Test</option>
<option *ngFor="let test of testList">{{test.test_name}}</option>
</select>
<button type="button" (click)="deleteTestNames(pointIndex)">Delete Test</button>
</div>
<button type="button" (click)="addTestNames()">Add Test</button>
</div>
</form>
{{ this.testForm.value | json }}
<div class="modal-footer">
<button
type="button"
class="btn btn-primary"
data-bs-dismiss="modal"
(click)="AddPrescription()"
>
Save changes
</button>
</div>
</div> -->