Datatables in Angular 5 - 404 Error when using Ajax and Angular way
Datatables in Angular 5 - 404 Error when using Ajax and Angular way
Sweety
Posts: 1Questions: 1Answers: 0
Hi All,
I am a beginner in Angular and want to use datatables in my project. I went through the tutorial here https://l-lin.github.io/angular-datatables/#/basic/angular-way and copy pasted the entire code as mentioned, but I am facing a 404 error for my json file. I tried different paths for data.json but can't seem to fix it. This is happening in "Angular way" and "with-ajax" examples. Could somebody please help?
This discussion has been closed.
Answers
Hi @Sweety,
The file, "data.json", needs to be accessible on your site. Probably the easiest way is to copy from their examples, and keep it inside your top-level directory "data" so it means less changes to your examples.
Cheers,
Colin