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='';
connectedCallback(){
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);
}
import {fireEvent} from 'c/pubsub';
event from main component to send values @salesforce-sas