After having finished and tested an Angular2 application on my local machine, I decided to move it to an AWS cloud server with Apache. I cloned the sw from git but, as soon as I launched the app, I got an error on the browser console stating:
EXCEPTION: Template parse errors:
Only void and foreign elements can be self closed "head" ("[ERROR ->]<head/>
After some research I found that all of my external html templates are magically enriched with a starting <head/>
tag which I do not see trace of in my code.
To fix this I had to turn off mod-pagespeed .Since I am not familiar with Apache configuration I do not know which side effects this may have and whether there is any better solution. Any help would be very much appreciated.
`. You can't use self-closed tags in angular2 templates, the details are [here](https://stackoverflow.com/questions/34692928/exception-template-parse-errors-only-void-and-foreign-elements-can-be-self-clo/39034132#39034132).
– peterh Aug 19 '16 at 08:38