I want to run my Angular app without any server/build/etc. For that, I built my app ng build -c=production
, but opening the generated index.html isn’t easy: I removed <base href="/">
and the type="module"
s from script injections, so it started nicely!
But… my “database” is a local CSV file I read up in a common way:
this.http.get('assets/index.csv', {responseType: 'text'}).subscribe({ ...
However, when I load the index.html, it throws an CORS error for this CSV, even if the searched location is correct. What should I do to not to have CORS error for these files?
(Angular 16)