css - How do I pause a Bootstrap progress bar width transition using Angular? -


i'm using bootstrap progress bar css transition run width 0 100%, @ same time $timeout running. when open confirm() box, $timeout pauses, css transition doesn't. there better way of linking 2 transition can paused well?

here code - listens start attribute change true.

.directive('mytimer', function($timeout){     return {         restrict: "e",         scope: {             duration: '@',             start: '@'         },         replace: true,         template: "<div class='progress'><div class='progress-bar' role='progressbar' style='-webkit-transition: width {{duration}}s linear; transition: width {{duration}}s linear'></div></div>",         link: function(scope, element, attrs){             attrs.$observe('start', function(a){                 if (a === 'true') {                     $timeout(function(){                         element.addclass('active');                     }, 1);                 }             });         }     }; })  .controller('mycontroller', function($scope){     var chosentimesec = $scope.chosentime * 1000;     $scope.timer = $timeout(function(){         $scope.finish();     }, chosentimesec); })  ----  <my-timer duration="{{chosentime}}" start="{{timerstarted}}"></my-timer> 


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -