melwinVincent / ionic4-star-rating

Star Rating component for ionic-4 projects
23 stars 11 forks source link

Compile error after upgrading to Ionic 5 #14

Open JeongJun-Lee opened 4 years ago

JeongJun-Lee commented 4 years ago

You can meet the error below after upgrading to Ionic 5.

ERROR in ../node_modules/ionic4-star-rating/dist/components/ionic4-star-rating-component.d.ts:2:10 - error TS2305: Module '"../../../@ionic/angular/ionic-angular"' has no exported member 'Events'. [ng] 2 import { Events } from '@ionic/angular';

JeongJun-Lee commented 4 years ago

Event has been removed from Ionic 5 and they are saying to use Observables or Redux as an alternative.

https://medium.com/wizpanda/dealing-with-breaking-change-in-ionic-5-db3ba711dfcd

JeongJun-Lee commented 4 years ago

I made temporary component for a test of Ionic 5. Until this component is updated, you can try it with https://github.com/JeongJun-Lee/ionic5-star-rating.

jonmbennett commented 4 years ago

I made temporary component for a test of Ionic 5. Try it with https://github.com/JeongJun-Lee/ionic5-star-rating.

Thanks for doing that!

For anyone else using this, remember that Ionic 5 uses new icons. So you'll need to change this:

activeIcon = "ios-star"
defaultIcon = "ios-star-outline"

to this:

activeIcon = "star"
defaultIcon = "star-outline"
iconio commented 4 years ago

I made temporary component for a test of Ionic 5. Try it with https://github.com/JeongJun-Lee/ionic5-star-rating.

Thank you!! Quick question, where do I remove the default star from 3?

mikev10 commented 4 years ago

I made temporary component for a test of Ionic 5. Try it with https://github.com/JeongJun-Lee/ionic5-star-rating.

Thank you!! Quick question, where do I remove the default star from 3?

I have the same question.

patnamapsara commented 3 years ago

Any Update on above error.. I have requirement to implement star rating in my application. But Ionic4-star rating showing error at events. Can some one help me with this

jonmbennett commented 3 years ago

Any Update on above error.. I have requirement to implement star rating in my application. But Ionic4-star rating showing error at events. Can some one help me with this

@patnamapsara I recommend using this one instead: https://github.com/JeongJun-Lee/ionic5-star-rating