Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Add star rating component #337

Closed
bekos opened this issue Apr 18, 2013 · 5 comments
Closed

Add star rating component #337

bekos opened this issue Apr 18, 2013 · 5 comments

Comments

@bekos
Copy link
Contributor

bekos commented Apr 18, 2013

Mainly out of curiosity, I wanted to see the way someone could implement a star rating system using only angular & bootstrap's CSS. It came out to be very simple!

This is an initial version : http://plnkr.co/edit/7Y5iGEcszsYjBgSiv1H4?p=preview

Not much time spent as you can imagine :)

@angular-ui/bootstrap Is this a directive worthy including in this library, in order to prepare a PR?

@jhiemer
Copy link

jhiemer commented Apr 18, 2013

@bekos looks nice. Something I had on my schedule for a long time. I would vote with yes! 👍

@jhiemer
Copy link

jhiemer commented Apr 18, 2013

@bekos first question: What really would be a neat solution is adding a callback for the select event. This means, when I click on the selection, then I could automatically trigger a REST event in the backend. Similar to the modal perhaps...

This could also be done by a $watch, but I like the callback approach better, as it is cleaner and does not lead to the over usage of $watches in general.

@bekos
Copy link
Contributor Author

bekos commented Apr 18, 2013

@jhiemer I also like the callback approach in general, but I don't know if everyone agrees. We will just wait to see, but it's OK from me to have this.

@pkozlowski-opensource
Copy link
Member

Funny thing, I've written something similar and posted it on the mailing list some time ago:
http://plnkr.co/edit/Z583G0NVsy2WtmS3jQWh?p=preview

I think it would be a nice addition to the project.

At the moment it would be -1 from me on a callback - people can always watch model and do whatever they want. But those are just my thoughts, I don't feel strongly about it - for me it is more in AngularJS spirit.

I guess that at some point we would discuss scope of the project to decide which directives should go into it. This directive is small and quite common use case so it feels like it is a good call. But we will have to draw a line somewhere.

@angular-ui/bootstrap Other thoughts?

@bekos
Copy link
Contributor Author

bekos commented Apr 18, 2013

@pkozlowski-opensource Sorry, I didn't know.

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

No branches or pull requests

3 participants