What are the ways to display 'chunked' responses as soon as they come into AngularJS?
No example because I am not sure what you are using in terms of transport code/if you have a websocket available:
$http does not support doing any of the callbacks until a success code is passed back through at the end of the request - it listens for the .onreadystatechange
with a 200
-like value.
If you're wanting to do a stream like this you either need to use $http
and wrap it in a transport layer that makes multiple $http
calls that all end and return a success header.
You could also use websockets, and instead of calling $http
, emit an event in the socket.
Then, to get the chunks back the the client, have the server emit each chunk as a new event on the backend, and have the front-end listen for that event and do the processing for each one.