angular-star-rating: AOT compile with Angular CLI fails
I added angular-star-rating (2.0.1) to my project last week and had no problems running JIT or AOT. Today, my build sever is failing and pointing to the following lines in angular-star-rating:
/node_modules/angular-star-rating/src/star-rating.component.ts.StarRatingComponent.html (9,17): Supplied parameters do not match any signature of call target. /node_modules/angular-star-rating/src/star-rating.component.ts.StarRatingComponent.html (9,17): Supplied parameters do not match any signature of call target.`
I’m looking at the changes over the last few days and don’t see anything related to any of the event methods that this error message type usually refers to. Anyone on the team have an idea what this could be about?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 15 (7 by maintainers)
Commits related to this issue
- fix(aot): fixed build for AOT Thx to @mhjmaas for the hint. The mouseleave callback is now stuffed with the default of 0 close #22 — committed to BioPhoton/angular-star-rating by BioPhoton 7 years ago
Hi @mhjmaas ! BIG THX for your help!
Enjoy AOT in version 3.0.0 on npm
😃
It seems you need to modify line 52 in the angular-star-rating sourcecode:
from:
(mouseleave)="onStarHover()">
to(mouseleave)="onStarHover($event)">
AOT compilation needs to match these parameters exactly to be able to do efficient tree shaking I believe. At least when I edit this line, everything starts working fine again. 😃
Hy!
Atw I have no clue why… Will have a look later this week.