I am creating a custom directive in AngularJS that takes advantage of the templateUrl key. The problem I'm running in to is that we are hosting these template files on an external CDN, so I am getting an Access-Control-Allow-Origin error.
XMLHttpRequest cannot load http://path_to_cdn/template_file.html. Origin http://xx.xx.xx.xx is not allowed by Access-Control-Allow-Origin.
I read somewhere that I could do something like this...
<script type="text/ng-template" src="http://path_to_cdn/template_file.html"></script>
...but this is not really ideal and I couldn't get it to work properly anyway.
Anyone have any suggestions?