진행률 막대의 "최대"값을 변경하면 진행률 막대의 상대적 진행률이 업데이트되지 않습니다. 나는 주위에 추한 일이하지만 깔끔한 방법AngularJS Bootstrap 진행률 막대 최대 변경
<progressbar value="dynamic/max*100"><span style="color:black; white-space:nowrap;">{{dynamic}}/{{max}}</span></progressbar>
참조 예이 있는지 알고 싶습니다 최대 값을
$scope.random = function() {
var other = Math.floor((Math.random() * 100) + 100);
var type;
if (value < 25) {
type = 'success';
} else if (value < 50) {
type = 'info';
} else if (value < 75) {
type = 'warning';
} else {
type = 'danger';
}
$scope.showWarning = (type === 'danger' || type === 'warning');
$scope.max = other;
$scope.type = type; };
을 randomise하는 방법을 사용하여
<progressbar max="max" value="dynamic"><span style="color:black; white-space:nowrap;">{{dynamic}}/{{max}}</span></progressbar>
여기 : http://plnkr.co/edit/urZH8i2sJUeeTgIJ7JWU?p=preview
고마워요, 진행 상황 막대를 깨끗하게 유지하는 가장 효과적인 해결책 인 것 같습니다. dynamic-max를 두 번 이상 사용할 상황에서 – Meredori