Runnning the app (JiT) works well but when I try to compile the app (I have followed this tuto) with AoT I get all the TypeScript errors and the compilation fails. I can't paste all the errors (there are too many) but here is a sample:
Error at C:/app-path/services/app.service.ts:18:23: Property 'saveScroll' does not exist on type 'CanComponentDeactivate'.
Error at C:/app-path/services/app.service.ts:45:20: Parameter 'object' implicitly has an 'any' type.
Error at C:/app-path/services/app.service.ts:48:24: Parameter 'mObject' implicitly has an 'any' type.
Error at C:/app-path/services/app.service.ts:75:30: Property 'value' does not exist on type 'FormBuilder'.
In your case the quickest solution is to disable the
noImplicitAny setting in
tsconfig.json. This fixes 2 and 3.
For the other type errors, where the compiler complains about missing properties, you can fall back to casting them to