O'Reilly logo

Web Application Development with MEAN by Robert Onodi, Adrian Mejia, Amos Q. Haviv

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Messaging

Now that we can initiate and resume a conversation, we need to be able to send messages in that conversation to the participants. We are going to focus on achieving this functionality.

The flow for sending messages is pretty simple. First, we send the desired message to the backend application, storing the message for history purposes, and we notify the recipient of a new message. Both the sender and the recipient have the message displayed on their devices.

Sending messages

Earlier, in the chat component, we used a message form component. This component will permit us to input messages and send them to the Node.js backend service. Let's keep it simple and add only the necessary functionalities. Create a new component file called public/src/message/message-form.component.ts ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required