58
There's something in the AngularJS docs that I can't seem to find or maybe I'm just missing.
I'm creating a web app with NodeJS and Express in the back-end and I'm trying to understand how it can interact with Angular in the front end. In particular, I'll have a JSON API for Angular to fetch the information from. I want for the front end to always be up-to-date.
My questions are:
- Does the two-way data binding feature mean Angular ($resource or $http) automatically fetches the data from the server every n seconds?
- Does it naturally use long polling, short polling or websockets?
- Do you need JQuery to achieve the server-client syncing or can everything be done with Angular?
- Do you have to add extra code to make this behavior happen? Do I need to use $timeout?
Every example I seem to find involves the client fetching the data once. Not syncing the data with the server.