angular-progress-button-styles icon indicating copy to clipboard operation
angular-progress-button-styles copied to clipboard

Added pbValue to allow changing the value without clicking the button

Open elis opened this issue 9 years ago • 1 comments

I've added pbValue to the scope of the button to allow instantiating the progress without actually clicking the button.

Also you'll see a change to grunt-contrib-sass - feel free to ignore, it's just because I couldn't install grunt-sass and needed it to compile.

elis avatar Nov 26 '15 12:11 elis

Hey Eli,

Thanks a lot for your PR!

we have taken a look at your suggestion and agree that it can be useful. But unfortunately we think that there's a better way to do it:

instead using value property

 'pbValue': '@' 

we suggest to expose some 'control object', which will have functions to affect button behavior (like start/stop/change progress)

 'pbControl': '='

This object could be set inside of button's link function like this:

$scope.pbControl = {
    start: function() { ....  },
    setProgress: function() { ... },
   stop: .....
}

And can be used in this way:

<button progress-button="" pb-control="someProperyInControllerScope"></button>

Would be great if you provide another PR with these fixes. Otherwise, we can do it in a week or something.

Thanks again for you help, Akveo team.

SashaSkywalker avatar Nov 27 '15 09:11 SashaSkywalker