ng-bs-animated-button icon indicating copy to clipboard operation
ng-bs-animated-button copied to clipboard

Allow empty string as TEXT

Open shlomiassaf opened this issue 10 years ago • 1 comments

Hi,

Currently, settings is set using the || operator... e.g: buttonDefaultText: $scope.options.buttonDefaultText || 'Submit',

This enforce the "Submit" to show even if the user has set the value to an empty string. This is not a behavior the user expects.

It should be: buttonDefaultText: ($scope.options.buttonDefaultText == undefined) ? 'Submit' : $scope.options.buttonDefaultText;

Perhaps adding a null check as well.

shlomiassaf avatar Jul 12 '14 23:07 shlomiassaf

Thanks for the feedback - I'll get this done the same time as #1

jeremypeters avatar Jul 15 '14 12:07 jeremypeters