Moving to strict.

Create form has now moved to constructor and route data subscribe is type safe.
This commit is contained in:
2020-11-23 09:18:02 +05:30
parent 30b1a3ef7d
commit 39e3cc51bb
52 changed files with 348 additions and 448 deletions
@@ -27,7 +27,13 @@ export class PurchaseDialogComponent implements OnInit {
private math: MathService,
private productSer: ProductService,
) {
this.createForm();
this.form = this.fb.group({
product: '',
quantity: '',
price: '',
tax: '',
discount: '',
});
this.listenToProductAutocompleteChange();
}
@@ -42,16 +48,6 @@ export class PurchaseDialogComponent implements OnInit {
this.product = this.data.inventory.product;
}
createForm() {
this.form = this.fb.group({
product: '',
quantity: '',
price: '',
tax: '',
discount: '',
});
}
listenToProductAutocompleteChange(): void {
const control = this.form.get('product');
this.products = control.valueChanges.pipe(