Moving to strict.
Create form has now moved to constructor and route data subscribe is type safe.
This commit is contained in:
@@ -30,17 +30,15 @@ export class ClosingStockComponent implements OnInit {
|
||||
private fb: FormBuilder,
|
||||
private toCsv: ToCsvService,
|
||||
) {
|
||||
this.createForm();
|
||||
}
|
||||
|
||||
createForm() {
|
||||
this.form = this.fb.group({
|
||||
date: '',
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((data: { info: ClosingStock }) => {
|
||||
this.route.data.subscribe((value) => {
|
||||
const data = value as { info: ClosingStock };
|
||||
|
||||
this.info = data.info;
|
||||
this.form.setValue({
|
||||
date: moment(this.info.date, 'DD-MMM-YYYY').toDate(),
|
||||
|
||||
Reference in New Issue
Block a user