I have developed an angular 6 application with --aot enabled and with lazy loading. This application on my local server is able to load in 2 sec. But when I load the same application on the AWS server, the loading time is more, and it is near to 40 sec.
Please let me know anyway is there to decrease the loading time of the application, while accessing it from the server?
Thanks to Akshay Rajut's answer, which helped me to increase the performance of my application.
Thanks in advance.
EDIT: I have taken build using the command: ng build --aot and using nginx for running the application.