How to load json file into Angularjs for ng-repeat

前端 未结 3 1448
春和景丽
春和景丽 2021-01-16 06:03

I have a simple json file with a list of artist names, like

[\"Vincent van Gogh\", \"Leonardo da Vinci\", \"Pablo Picasso\"]

I can\'t figur

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-16 06:45

    I ran into this issue with a node server hosted in Azure and the fix was to ensure the mime type for JSON files was set properly. I was hosting in azure so that meant ensuring a web.config existed with the right settings, but I'm not sure what's required with Django. Without the proper mime type the server would report a 404 like you mentioned.

提交回复
热议问题