Moving to strict.

Create form has now moved to constructor and route data subscribe is type safe.
This commit is contained in:
tanshu committed 2020-11-23 09:18:02 +05:30
1 parent 30b1a3ef7d
commit 39e3cc51bb
52 files changed
+348 -448

No files matched your search

@@ -23,17 +23,15 @@ export class CostCentreDetailComponent implements OnInit, AfterViewInit {
private toaster: ToasterService,
private ser: CostCentreService,
) {
this.createForm();
}
createForm() {
this.form = this.fb.group({
name: '',
});
}
ngOnInit() {
this.route.data.subscribe((data: { item: CostCentre }) => {
this.route.data.subscribe((value) => {
const data = value as { item: CostCentre };
this.showItem(data.item);
});
}