My app.js
$scope.leerProductos = function() {
InitService.leerProductos().then(
function(d) {
$scope.productos = d;
}
);
};
My html:
<div ng-init="leerProductos()">
<div ng-repeat="pro in productos">
{{pro.name}} y {{pro.precio}}
</div>
</div>
How can I call this method every 5 seconds?