Код: Выделить всё
var lpOnComplete = function(response) {
alert(response);
// do more processing
lpStart();
};
var lpStart = function() {
$.post('/path/to/script', {}, lpOnComplete, 'json');
};
$(document).ready(lpStart);
Подробнее здесь: https://stackoverflow.com/questions/157 ... ng-polling