Я пытаюсь автоматически обновить таблицу в приложении Angular 1.6, используя:
function monitoringConfigurationCtrl($scope, $http,$interval){
$interval($http.get('/monitoringresults').
then(function(response) {
$scope.monitoringResults = response.data;
}),10000);
...
)
Я получаю эту ошибку в консоли браузера:
angular.js:13236 TypeError: f is not a function
at r (angular.js:12053)
at m.$eval (angular.js:16820)
at m.$digest (angular.js:16636)
at m.$apply (angular.js:16928)
at angular.js:12043
HTML-представление выглядит следующим образом:
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>Resource</th>
<th>Monitoring Method</th>
<th>Monitoring Parameters</th>
<th>Last Probed</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="result in monitoringResults">
<td>{{ result.monitoring_target }}</td>
<td>{{ result.monitoring_method }}</td>
<td>{{ result.monitoring_parameter }}</td>
<td>{{ result.date_recorded }}</td>
<td>{{ result.monitoring_result }}</td>
</tr>
</tbody>
</table>
</div>
Как правильно реализовать такое живое обновление с помощью Angular 1.X?