Search code examples
cssangularjsdynamicwidthng-style

Dynamic width with Angular for progress bar not working in IE11


I have a progress bar showing me progress in uploads. the CSS works for chrome ,but dosent for IE

   <div class="progress-bar">
                            <div style="width: {{media.progress*0.95 + (media.result ? 5 : 0)}}%;" class="progress-bar__bg"></div>
                        </div>

Solution

  • Use ng-style

    ng-style="{width: (media.progress*0.95) + (media.result ? 5 : 0)+ '%'}"