When I use the systemjs loader with angular2, and my static content is in a different domain, I get No 'Access-Control-Allow-Origin' header is present on the requested resource.
But if I install Allow-Control-Allow-Origin: * chrome plugin, everything works fine.
full error message:
http://www.different-domain.com/app/main.js. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.example.com' is therefore not allowed access.
I added to allow access on my server and work with the usual <script>jQuery script tag and loader, so I'm sure there are no problems with the server or client. It seems that the problem is with the systemjs bootloader, which does not allow receiving data from different domains.
source
share