Handling realtime data with angularJs
<p>So, I am playing with these temperature sensors and I have a REST API structure to retrieve current temperature. In the front end, I have my angularJs code and I want to be able to see my data real time.</p>

<p>So, say this is my service call</p>

<pre><code>getTemperature: function(){
   return $http({
     method:'GET',
     url:'https://someurltoget/device10/temperature',
     header:{
            'Accept':'application-json'},
     }).then(
      function(response){
         return response;
    },function(error){
         return error;})}
</code></pre>

<p>in my controller, I call this service, and update my view. But, temperature values update themselves in every 60 seconds, and I want this call to update my view accordingly.</p>

<p>However, I am not sure which way would be the best practice to get real-time data simultaneously. </p>

<p>I can only think of using $interval and update the view every 60 sec. but I feel like this is not the best way to resolve this problem.</p>

<p>So, any idea how can this be accomplished in its best way in AngularJS?</p>