function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

aura:iteration showing blank values

I am not sure why aura:iteration is displaying blank list of values.I can see that is repeating 5 times but it is showing blank values.Please help Below is my component-ContactItemList.cmp
<aura:component controller="ContactItemListController" >
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute name="contacts" type="Contact[]"/>
	<aura:iteration items="{!v.contacts}" var="p">
Below is my client side controller-ContactItemListController.js
	doInit : function(component, event, helper) {
Below is my server sider controller-ContactItemListController.apxc
public class ContactItemListController {
    public static List<Contact> getContacts() {
        List<Contact> cList=[select id from Contact limit 5];
        return cList;//[select id, name from contact limit 100];//cList;
Below is my helper file-ContactItemListHelper.js
 	getContacts: function(component) {
        var action = component.get("c.getContacts");
        action.setCallback(this, function(a) {
            component.set("v.contacts", a.getReturnValue());

Best Answer chosen by Suneel#8
Vinod BirlaVinod Birla
Try {!p.Id}.

All Answers

Vinod BirlaVinod Birla
Try {!p.Id}.
This was selected as the best answer
Thanks a lot for the timely reply