Change bootstrap progress-bar width from angularjs

后端 未结 5 1607
臣服心动
臣服心动 2020-12-09 04:20

I\'m new in Angularjs and I am trying to update the width of a progress bar when a value in my controller change.

I have something like:



        
5条回答
  •  醉梦人生
    2020-12-09 05:18

    You can write custom ng-style:

     
    10% Complete (warning)

    and in controller:

     $scope.percentageStyle = {
       width : $scope.getPercentage() + '%'     
     };
    

    Demo Fiddle

提交回复
热议问题