I have a $scope.event where i am pushing data when i received from a server , I am working with the angularjs progress-bar so based on user interaction i want to start recording data so when data start recording i want to create new array like $scope.progressbarData so i can set dynamic value of the progressbar.
ctrl.js
$scope.event = [];
$scope.progressbarData = [];
$scope.dynamic = 0;
$scope.max = 200;
socket.on('ditConsumer',function (data) {
var obj = {
file:$scope.filename,
data:data
}
$scope.event.push(data);
if(sendMessageFlag === true) {
$scope.dynamic = $scope.event.length;
return sendMessageToFile(obj);
}
});
main.html
<div class="row">
<div class="col-md-10">
<uib-progressbar max="max" animate="true" value="dynamic">{{dynamic}} / {{max}}</uib-progressbar>
</div>
</div>