Skip to content

An Angular2 component to visualize a star rating bar, built for Ionic 2.

License

Notifications You must be signed in to change notification settings

itshu/ionic2-rating

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ionic2-rating

An Angular2 component to visualize a star rating bar, built for Ionic 2.

Preview

NPM version Downloads

NPM

How to install:

$ npm install --save ionic2-rating

How to use:

import { Ionic2RatingModule } from 'ionic2-rating';

@NgModule({
  imports: [
    Ionic2RatingModule
  ]
})
export class AppModule {}
<rating [(ngModel)]="rate" 
        readOnly="true"
        max="5"
        (ngModelChange)="onModelChange($event)"></rating>

You may also need to customize component styles:

ul {
  padding: 0px;

  &.rating li {
    padding: 5px 10px;
    background: none;
    color: #ffb400;

    ion-icon {
      font-size: 30px;
    }
  }
}

Based on ionic-rating for Ionic 1: https://github.com/fraserxu/ionic-rating

About

An Angular2 component to visualize a star rating bar, built for Ionic 2.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%