我需要很快將一個網站投入生產,並且正在研究AOT以提高性能(我的應用程序需要大約3-4秒才能加載Chrome,Firefox需要8-10秒,而這只是不生產可能)。Angular AOT編譯失敗
我也跟着上https://angular.io/docs/ts/latest/cookbook/aot-compiler.html指導,但我堅持與編譯部分...
如果鍵入:node_modules /的.bin/NGC -p tsconfig-aot.json我會得到一個不錯的「編譯失敗」有100 100個錯誤的列表,像這樣的:
Error at /myapp/aot/app/contact/admin/contact-list.component.ngfactory.ts:64:7: Supplied parameters do not match any signature of call target.
我不能夠解決所有這些,因爲有些是從直接角度(我猜的)來了,例如:
Error at /myapp/node_modules/@angular/core/src/di/reflective_provider.d.ts:88:165: Cannot find name 'Map'.
編譯失敗與所有這些錯誤有關,如果我解決它們,編譯將會通過?如果是的話,甚至Angular會導致錯誤,例如我提供的錯誤,這是否正常?
謝謝!
注意:我正在使用Angular 2.1.1。