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
Naval Sharma4Naval Sharma4 

Having trouble with Lightning component when I put a component in the div. It doesn't render the nested component.

Here is my code and according to me, there is nothing which can cause this issue. It does work when I don't use the div tag around the c:NestedComponent. 

MainComponent.cmp   
<aura:component controller="ContactClass" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
 <aura:attribute name="contact" type="Contact[]"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:iteration items="{!v.contact}" var="con">
        <br/>
        <a href="javascript:void(0);" onclick="" role="tab" tabindex="0" aria-selected="true" aria-controls="tab-default-1" id="{!con.Id}">{!con.Name} | {!con.AccountId}</a>
  <div>
        <c:NestedComponent Cont="{!con}" />
  </div>
        
    </aura:iteration>
</aura:component>

MainComponent.js
({
    doInit: function(component, evt, helper) {
        var action = component.get("c.getContact");
        action.setCallback(this, function(a) {
                component.set("v.Contact", a.getReturnValue());
        });
        $A.enqueueAction(action);
        
    },  
}
})

NestedComponent.cmp
<aura:component controller="SBBQQUOTELIneClass" access="global" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction">
    <aura:attribute name="Cont" type="Contact" default="{ 'sobjectType': 'Contact' }" access="global"/>
    <p>QUestion 1</p>
    <force:inputField aura:id="prId" value="{!v.Cont.AccountId}" class=""/>
    
</aura:component>

 
krisstannumkrisstannum
is Locker Service On or Off? I'm not really sure if it could cause that error though.