diegoapolinario / ionic2-rating

Rating stars component for your Ionic 2 App

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rating stars component for your Ionic 2 App

Installation:

Copy the ion-rating folder to your src/components/ folder and import it on your app.module.ts and add IonRating to the declarations arrays.

// ... other imports ...
import { IonRating } from '../components/ion-rating/ion-rating';
declarations: [
  MyApp,
  HomePage,
  // ... other declarations ...
  IonRating
],

Usage:

On your view:

<ion-rating
    [numStars]="5"
    [readOnly]="false"
    [value]="3.2"
    (clicked)="starClicked($event)">
</ion-rating>

On your controller:

starClicked(value){
   console.log("Avaliaram em :", value);
}

About

Rating stars component for your Ionic 2 App


Languages

Language:TypeScript 74.6%Language:HTML 24.1%Language:CSS 1.3%