Skip to content

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.

2 participants