Angular Ionic2评级条问题

Angular Ionic2评级条问题,angular,ionic2,rating,Angular,Ionic2,Rating,我在学离子2。我想在我的应用程序中使用星级。我从这个链接中引用了。但是当我添加标签时,我在这个链接中遇到了一个问题。 有人能帮我吗 rating.html <ion-content class="has-header"> <rating [(ngModel)]="rate" readOnly="false" max="5" emptyStarIconName="star-outline" halfStarIconName="star-half

我在学离子2。我想在我的应用程序中使用星级。我从这个链接中引用了。但是当我添加标签时,我在这个链接中遇到了一个问题。 有人能帮我吗

rating.html

<ion-content class="has-header">
<rating [(ngModel)]="rate" 
    readOnly="false"
    max="5"
    emptyStarIconName="star-outline" 
    halfStarIconName="star-half" 
    starIconName="star" 
    nullable="false"
    (ngModelChange)="onModelChange($event)"></rating>


您需要在
模块内导入
Ionic2RatingModule

import { Ionic2RatingModule } from 'ionic2-rating';

@NgModule({
    declarations: [

    ],
    imports: [
        Ionic2RatingModule
    ],
    entryComponents: [

    ]
})

是的,我已经导入了模块。然后我还得到了一个问题,因此您需要在directives@Component({templateUrl:'build/pages/search/search.html',providers:[EmployeeService,UtilityService],ChangeDetectionStrategy.OnPush,directives:[Rating]})下添加