I am trying out how to pass a message from app.component.ts to be displayed in messageComponent.ts
on app.component.html I hav
you can use input for the same
< app-messagecomponent [YourInputVariableName]= "YourMessage" >< /app-messagecomponent>
in app.compnent write
YourMessage:any='my Message to be displayed in the messageComponent';
in app-message.component write
@Input YourInputVariableName:any;
you can print message in app-messagecomponent by this.YourInputVariableName