My Parent page looks like this.
html:
<counter [conversationId]="conversationId"></counter>
component:
public conversationId: string;
public showModal() {
this.conversationId = '1234'
this.modalService.showComponent(CounterPage, { class: 'modal-lg' });
}
My Child page looks like this.
@Input() conversationId: any;
public ngOnInit (): void {
alert(this.conversationId); //shows undefinded.
}
Looks like this is common issue here. None of the solutions worked for me.