# Rating Demo
A rating indicates user interest in content

### Design

### Operate

Value: {{ rating }}
Max Rating:
Type:
Size:

### Options

- rating: Required. Current rating
- maxRating: Required. Maximum rating
- type: Optional. Rating icon type [ heart | star(default)]
- size: Optional. [ mini | tiny | small | normal(default) | large | huge | massive ]

### Codes

    <lsu-rating [(ngModel)]="rating" [maxRating]="getMaxRating()" [type]="type" [size]="size"></lsu-rating>

    import { Component } from '@angular/core';

    @Component({
      selector: 'rating-demo',
      templateUrl: './rating.html'
    })
    export class RatingDemoPage {

      rating: number = 3;

      type: string = 'star';
      size: string = "default";

      sizes: Array<string> = [];
      maxRating: string = '10';

      constructor() {
      }

      ngOnInit() {
        for (let i = 5; i < 15; i++) {
          this.sizes.push(i + '');
        }
      }

      getMaxRating(): number {
        return parseInt(this.maxRating);
      }

      setType(type: string): void {
        this.type = type;
      }

      setSize(size: string): void {
        this.size = size;
      }
    }