In my Angular app I am fetching data from an api service which provides me JSON data. I have several values in fetched data. See the example:
{
"StartDate": "2020-07-06 23:29:01",
"Visits": 1,
"Clicks": 1,
"FormSuccess": 0,
"FormFailures": 0,
}
On my Angular App I have made a dashboard which shows these numbers. As you can see these numbers will change by time...
Is there a "smarter" way to put a listener to this API Get url and whenever changes happens to these, it should refresh my dashboard with the new figures?
my JSON get looks like this:
ngOnInit(): void {
this.http.get("https://myapiurl/info", this.httpOptions)
.subscribe((data) => {
this.jsonArray = data;
})
}