获得最大值100%后如何隐藏引导进度条.AngularJS [英] How to hide bootstrap progress bar after it get's the maximum value 100%. Angularjs

查看:63
本文介绍了获得最大值100%后如何隐藏引导进度条.AngularJS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用引导进度栏.我想要的是,当我单击 test 按钮时,将显示进度条,并在进度条显示为100%之后将其隐藏,而当我再次单击test按钮时,它将再次显示.我怎样才能做到这一点?

这是我的小提琴: http://jsfiddle.net/1ptm607v/71/

示例代码:

 < div ng-controller ="MainCtrl">< progressbar value ="data.progress" class ="progress-striped active" animate ="true" max ="100"></progressbar>< button ng-click ="test()"> test</button> 

解决方案

您可以使用 ng-show ng-hide 属性.

 < div ng-controller ="MainCtrl">< progressbar ng-show ="data.progress< 100" value ="data.progress" class ="progressed-striped active" animate ="true" max ="100"></progressbar>< button ng-click ="test()"> test</button> 

I am working with bootstrap progress bar. What I want is when I click the test button the progress bar will shown and after it get's 100% I want to hide it and when I click the test button again it will show again. How can I do this?

This is my fiddle: http://jsfiddle.net/1ptm607v/71/

sample code:

<div ng-controller="MainCtrl">
<progressbar value="data.progress" class="progress-striped active" animate="true" max="100"></progressbar>
<button ng-click="test()">test</button>

解决方案

You can do with ng-show or ng-hide attributes.

<div ng-controller="MainCtrl">
<progressbar ng-show="data.progress < 100" value="data.progress" class="progress-striped active" animate="true" max="100"></progressbar>
<button ng-click="test()">test</button>

这篇关于获得最大值100%后如何隐藏引导进度条.AngularJS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆