Javascript/Angular slicing an array before its declared -


this might seem odd questions; know possible slice array, thinking, if i'm calling array externally via $http (using angular) so:

$http.get('/url') 

is possible me declare how of array want retrieve first before making request, instead of retrieving whole thing (and therefore saving on performance). know possible similar using php wasn't sure extent had in javascript? or can slice once array declared fully?

the way retrieve part of array server requesting data support capability. cannot entirely client unless server has capability.

the usual way done add query parameters url specify how of data want , server @ query parameters , send pieces of data.

for example:

$http.get('/url?start=0&end=20'); 

arrays can sliced once exist , have data in them i'm not sure part of question trying ask about. either client or server slice result array once had built initial array.


Comments