Angular 6 - Passing messages via service to from component to message component : <p>I am trying out how to pass a message from <code>app.component.ts</code> to be displayed in <code>messageComponent.ts</code></p>

<p>on <code>app.component.html</code> I have added <code>&lt;app-messagecomponent&gt;&lt;/app-messagecomponent&gt;</code></p>

<p>Add the moment it's just showing nothing.</p>

<p>I also have a method in a service:</p>

<p>message.service.ts</p>

<pre><code>message(message) {
    return message;
}
</code></pre>

<p>So what I want to do to pass a message from other components via the message service so it's displaying in the app-messagecomponent.html</p>

<p>For example from app.component.ts:</p>

<pre><code>sendMessageToService() {
    this.myservice.message('my Message to be displayed in the messageComponent');
}
</code></pre>

<p>How can I do this?</p>
