I want the data to get automatically updated when a new data get updated in the database without using the SET Interval function.
var myVar = setInterval(myTimer ,1000);
function myTimer() {
$http.get('URL CALL', { params: { "key1": "value1"} })
.success(function(data) {
document.getElementById('available').value=data.status;
})
}