angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.3k stars 6.74k forks source link

showSpinner dinamically #6605

Open wkjesus opened 6 years ago

wkjesus commented 6 years ago

Bug description:

i was looking on the code and detect that the attribute showSpinners, only work when load the directive, and is unable to trigger dinamically with click from a button or else, i do some hack

and put this code

$scope.showSpinners = timepickerConfig.showSpinners; if ($attrs.showSpinners) { watchers.push($scope.$parent.$watch($parse($attrs.showSpinners), function(value) { $scope.showSpinners = !!value;

    updateTemplate();

}));

} /$scope.showSpinners = angular.isDefined($attrs.showSpinners) ? $scope.$parent.$eval($attrs.showSpinners) : timepickerConfig.showSpinners;/

and work like a charm.

i know this is not the best solution, i hope theres is a better one that can use provider from this comunity. Greetings.

Silverium commented 6 years ago

Hi, there's a pull request that solves this in a more elegant way. check it out: https://github.com/sykes10/bootstrap/commit/6a9c72a6a194d58d3d2850c2cefa0f4c839f9f1c

wkjesus commented 6 years ago

lol i suggested that solution in stackoverflow for the user who post the issue .lol but great if fixed.

Silverium commented 6 years ago

It's me. 😁😁😁 On Fri, 28 Jul 2017 at 20:00, wkJesus notifications@github.com wrote:

lol i suggested that solution in stackoverflow for the user who post the issue .lol but great if fixed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular-ui/bootstrap/issues/6605#issuecomment-318722366, or mute the thread https://github.com/notifications/unsubscribe-auth/AKFp2BRNznFxIDhybYHNHKx2LlKgoZeeks5sSiG6gaJpZM4OllpH .