ionic2-rating
An Angular2 component to visualize a star rating bar, built for Ionic 2.
How to install:
$ npm install --save ionic2-rating
How to use:
;;;; // Import ionic2-rating module;
<rating [(ngModel)]="rate" readOnly="false" // default value, so it can be ommited max="5" // default value emptyStarIconName="star-outline" // default value halfStarIconName="star-half" // default value starIconName="star" // default value nullable="false" // default value (ngModelChange)="onModelChange($event)"></rating>
You may also need to customize component styles:
ul { padding: 0px; &.rating li { padding: 5px 10px !important; background: none; color: #ffb400; ion-icon { font-size: 30px; } }}
Based on ionic-rating for Ionic 1: https://github.com/fraserxu/ionic-rating