Moving to strict.
Create form has now moved to constructor and route data subscribe is type safe.
This commit is contained in:
@@ -26,7 +26,10 @@ export class IssueDialogComponent implements OnInit {
|
||||
private math: MathService,
|
||||
private batchSer: BatchService,
|
||||
) {
|
||||
this.createForm();
|
||||
this.form = this.fb.group({
|
||||
batch: '',
|
||||
quantity: '',
|
||||
});
|
||||
this.listenToBatchAutocompleteChange();
|
||||
}
|
||||
|
||||
@@ -38,13 +41,6 @@ export class IssueDialogComponent implements OnInit {
|
||||
this.batch = this.data.inventory.batch;
|
||||
}
|
||||
|
||||
createForm() {
|
||||
this.form = this.fb.group({
|
||||
batch: '',
|
||||
quantity: '',
|
||||
});
|
||||
}
|
||||
|
||||
listenToBatchAutocompleteChange(): void {
|
||||
const control = this.form.get('batch');
|
||||
this.batches = control.valueChanges.pipe(
|
||||
|
||||
Reference in New Issue
Block a user