here is design atrribute @api parentcls and childcls i m trying to fetch these design attribute in another component on same page i tried constructor too but didnt get value on load

@api parentcls='';
@api childcls='';

    console.log('connectedcallback',this.parentcls); //value getting
    console.log('connectedcallback',this.childcls); //value getting 
    fireEvent(this.pageRef, 'parentclass', this.parentcls);
    fireEvent(this.pageRef, 'childclass', this.childcls);

in another component of same page

connectedCallback() {
    registerListener('parentclass', this.parentcss, this);
    registerListener('childclass', this.childcss, this);
  • can you show what is fireEvent? Aug 5, 2019 at 6:57
  • import {fireEvent} from 'c/pubsub'; event from main component to send values @salesforce-sas
    – sfdc
    Aug 5, 2019 at 7:20
  • Can you show full code? there are multiple steps involved in using pubsub, so will be able to help better if I acn see full flow Aug 6, 2019 at 8:57


You must log in to answer this question.

Browse other questions tagged .