I need to display a table of possibly hundreds of items, each having a
rating. As the table is read-only, I'm using one-time bindings[1] for
each cell's expression. Eg
<td>{{ ::item.title }}</td>
Each item has a rating (1 through 5), which I'd like to display as 5
stars, filled or hollow. The ui.bootstrap.rating directive does this
nicely.
<rating ng-model="::item.ratingValue"
max="5"
readonly="true"></rating>
Unfortunately, with more than about 10 items, this increases page
rendering time noticeably. Looking at the implementation, it seems like
the directive does a lot of work that is not needed in my static case.
Of course, I could implement my own directive for this specific purpose.
However, against not-invented-here-syndrome, if possible I'd rather make
ui.bootstrap.rating or another existing component work in my case.
Any suggestions?
Michael
[1] https://code.angularjs.org/1.3.0-beta.17/docs/guide/expression
[2] http://angular-ui.github.io/bootstrap/#/rating
--
Michael Schuerig
mailto:[email protected]
http://www.schuerig.de/michael/
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.