Is it possible to update my API (get) using the setInterval()
function?
This is my current get function:
getServices(){
return this._http.get(this._url)
.map(res => res.json());
}
I want to refresh my data (get json data) every 1 second.
I came across this example, but it only displays logs every one second. How can I update my API with a get request?
setInterval(function (getServices) {
console.log("Test")
}, 1000)