Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pbValue to allow changing the value without clicking the button #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

elis
Copy link

@elis elis commented Nov 26, 2015

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.

@SashaSkywalker
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants