Datatables in Angular 5 - 404 Error when using Ajax and Angular way

Datatables in Angular 5 - 404 Error when using Ajax and Angular way

SweetySweety 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?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    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

This discussion has been closed.