You need to sign in to do that
Don't have an account?
brahmaji tammana
Calling a controller from a button which is in aura:iteration
Can you someone help me to call a controller from aura:iteration tag ?
I am able to call from outside aura:iteration but i am not able to do the same within aura:iteration. Basically for all the iteration items i need to put one input text and Post button to send an email by taking the input text field value.
Thanks
Brahma
<aura:iteration items="{!v.contacts}" var="c"> <a href="{! '/'+c.Id}" > <p> {!c.Name} ( {!c.Birthdate} ) </p> </a> <h6> {!c.Email}</h6> <ui:inputText label="Greetings !!" value="{!v.greeting}" /> <ui:button label="Post" press="{!c.gsendmail}" /> <button type="button" onclick="{!c.gsendmail}" >Send</button> </aura:iteration>
I am able to call from outside aura:iteration but i am not able to do the same within aura:iteration. Basically for all the iteration items i need to put one input text and Post button to send an email by taking the input text field value.
Thanks
Brahma
Can you share the Error that you are getting and share the js code of gsendmail method as well.
I am not getting any error. Basically it is not calling my controller.
But if i write a button outside aura:iteration tag, it works.
Thanks
Brahma