andrucz / ionic2-rating

:star: Angular star rating bar. Built for Ionic 2+.
MIT License
178 stars 62 forks source link

Getting error like rating is not a known element in Ionic2 project #23

Closed andaralex closed 7 years ago

andaralex commented 7 years ago

Error: Template parse errors: rating' is not a known element: . If 'rating' is an Angular component, then verify that it is part of this module. . To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("

Rating [ERROR ->]
GaryMeliman commented 7 years ago

Put Ionic2RatingModule on the module of the page where you want to use the ratingbar, like this.

import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { EvaluacionPage } from './evaluacion';
import { Ionic2RatingModule } from 'ionic2-rating';

@NgModule({
  declarations: [
    EvaluacionPage,
  ],
  imports: [
    IonicPageModule.forChild(EvaluacionPage),
    Ionic2RatingModule
  ],
  exports: [
    EvaluacionPage
  ]
})
export class EvaluacionPageModule {}