问题
I have hosted my Angular App which is compiled using AOT compiler on Amazon S3. However, when I try to load the app it gives me the following error
The app runs perfectly well with ng serve --aot
but the same error will come up if I serve the distribution on python http-server locally.
Update: I have tried different workarounds and ways to try to get it working. But i haven't been able to fix it. I suspect that the error throws when trying to do a production build with AOT compiler. When built with ng build --aot
the app work as intended.
I have also opened up an issue in Github since i haven't been able to find a solution even after doing bit more research in to the issue.
来源:https://stackoverflow.com/questions/47884127/error-when-loading-a-angular-app-with-aot-build-on-amazon-s3