I need to display some data from a database to the user. The data is in a json file and has a pretty huge size. The size of json file is roughly around 15MB. I created a ser
Based on your requirements of dealing with essentially a huge JSON payload. FWIW you have two options:
Your server supports HTTP/JSON streaming:
create an angular onreadystatechange handler and use a streaming JSON parser like oboe.js
Your server DOES NOT support HTTP/JSON streaming
Do what everyone else is suggesting and provide a paginated access to that payload so that the browser can load it in chunks on demand.
Make your backend deliver the file in chunks, so that your angular frontend can retrieve part of it at a time.
Something like:
/backend/getentries?skip=500&count=100
The have your frontend repeatedly call the backend while counting up skip and append the results you are getting back to whatever you already have in the frontend.