You need to sign in to do that
Don't have an account?
vinny r
Lightning Component Framework Specialist - issue in validating step 9
I am getting below error. Can someone please help
Challenge Not yet complete... here's what's wrong:
The FiveStarRating controller placeholders aren't filled in correctly.
Please see my code below.
FiveStarRating.cmp
Challenge Not yet complete... here's what's wrong:
The FiveStarRating controller placeholders aren't filled in correctly.
Please see my code below.
FiveStarRating.cmp
<aura:component > <aura:attribute name="value" type="integer" default="0"/> <aura:attribute name="readOnly" type="boolean" default="false"/> <ltng:require styles="{!$Resource.fivestar + '/rating.css'}" scripts="{!$Resource.fivestar + '/rating.js'}" afterScriptsLoaded="{!c.afterScriptsLoaded}"/> <aura:handler name="change" value="{!v.value}" action="{!c.onValueChange}"/> <ul aura:id="ratingarea" class="{!v.readOnly?'c-rating readonly':'c-rating'}"> </ul> </aura:component>FiveStarRatingController.js
({ onValueChange:function(component,event,helper) { console.log('In onValueChange function') if(component.ratingObj) { var value=component.get('v.value'); component.ratingObj.setRating(value,false); } }, afterScriptsLoaded:function(component,event,helper) { var domE1 = component.find("ratingarea").getElement(); var readOnly = component.get('v.readOnly'); var currentRating = component.get('v.value'); var maxRating = 5; var callback = function(rating) { component.set('v.value',rating); } component.ratingObj=rating(domE1,currentRating,maxRating,callback,readOnly); } })
Check below link which has the resolution for the same error with below line.
https://developer.salesforce.com/forums/?id=9060G000000MUtyQAG
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya
@Sandya: link is not working. please paste the solution