I am able to see the lightning component in the community builder.
- I am also able to drag the component.
- Also, able to see in the preview mode when clicked on preview.
- When I publish the changes, the component doesn't load when I browse the live community.
Any inputs? What am I missing?
Thanks
<aura:component controller='NewsListController' implements="forceCommunity:availableForAllPageTypes" access="GLOBAL">
<aura:attribute name="news" type="News_Announcements__c[]"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<ul>
<aura:iteration items="{!v.news}" var="new">
<li>
<a href="{! '#/sObject/' + new.Id + '/view'}">
<p>{!new.News_Title__c}</p>
<p>{!new.News_Date__c}</p>
</a>
</li>
</aura:iteration>
</ul>
({
doInit : function(component, event) {
var action = component.get("c.findAll");
action.setCallback(this, function(a) {
component.set("v.news", a.getReturnValue());
});
$A.enqueueAction(action);
}
})