I installed ionic-rating package from > ionic-rating - npm
I followed the instruction in the link but I keep getting errors shown below:
NG0304: 'ion-rating' is not a known element:
1. If 'ion-rating' is an Angular component, then verify that it is part of this module.
2. If 'ion-rating' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
Similar error using ‘ionic5-star-rating’ package.
I could not figure out the problem. Can anyone help me understand what is wrong?
Searching the forums for “CUSTOM_ELEMENTS_SCHEMA” should give you a bunch of ideas. I suspect you’re using lazy loading and forgetting to import the module for that rating component where you’re actually using it.
Personally, I don’t think lazy loading provides anywhere near as much benefit to 95% of apps, and has no business being promoted as heavily as it is. I would just throw everything in the
AppModule and forget about all the headache. However, if you want to continue using lazy loading, follow the instructions in the docs you linked exactly:
Once installed you need to import our module in the parent module for the component you will be using it in