hussain hussain - 3 months ago 74
AngularJS Question

How to use max value attribute using angularjs uib-progressbar?

I want to set max value to 200 count and when i receive message it should show current messages count in progressbar , With below code when i send one message whole progress bar display 100% and it also shows text in the progressbar. Any idea ?

main.html

<uib-progress><uib-bar ng-repeat="bar in event track by $index" max="max" value="bar"><span ng-hide="bar < 5">{{bar}}%</span></uib-bar></uib-progress>


ctrl.js

$scope.max = 200;
$scope.event = ["lorem ipsum","lorem ipsum","lorem ipsum"]

Answer

use this max="{{max}}"

<uib-progress><uib-bar ng-repeat="bar in event track by $index" max="{{max}}" value="bar"><span ng-hide="bar < 5">{{bar}}%</span></uib-bar></uib-progress>