I need to put a website in production soon and am looking into the AOT to improve performance (my app needs about 3-4 secs to load on Chrome, 8-10 secs on Firefox, which is just not possible for production).
I followed the guide on https://angular.io/docs/ts/latest/cookbook/aot-compiler.html but am stuck with the compiling part...
If I type : node_modules/.bin/ngc -p tsconfig-aot.json I will get a nice "Compilation failed" with a list of around 100 hundred errors, like this one :
Error at /myapp/aot/app/contact/admin/contact-list.component.ngfactory.ts:64:7: Supplied parameters do not match any signature of call target.
I am not able to solve all of them, as some are coming from Angular directly (I guess), for example :
Error at /myapp/node_modules/@angular/core/src/di/reflective_provider.d.ts:88:165: Cannot find name 'Map'.
Is the compilation failed related to all these errors and if I solve them the compilation will pass ? If yes, is it normal that even Angular causes errors such as the one I provided ?
Thanks !
Note : I am using Angular 2.1.1.