I have a component, which has an image. Onclick of image I want to show up a popup window and in that show values and button. I am able to extract values on click of image, but not able to find how to show them in a new window.
Below is the sample code
Component
<div onclick="{!c.addContact}">
<c:svg class="slds-icon slds-icon-text-default slds-float--right"
xlinkHref="/resource/SLDS100/assets/icons/utility-sprite/svg/symbols.svg#adduser" />
</div>
Js Controller
addContact : function(component){
var action = component.get("c.displayContacts");
action.setCallback(this, function(a){
var list = a.getReturnValue();// the list is coming here with values
alert('length'+ list.length);
for(i = 0 ; i< list.length(); i++)
{
alert('a' list[i].checked); // I want to show the values in the new pop up window or save it another attribute which shows up new component.
}
});
$A.enqueueAction(action);
Note: The method in the Apex controller writtens a wrapper class list and I want to iterate that list and show its value. Hence I think alert wont work. Can I show a new component as a pop up.
Any quick help will be much appreciated.
Best Answer
Try to modify your code.
In my environment, alert works without problems.