10.8: Sending Messages
Now we'll work on getting the send message functionality from the PhotoEditor
component functional.
Add sendMessage() to UserService
We'll start off by adding a sendMessage()
method to the UserService
. This will again be very similar to other methods we've written:
Update MemberMessagesComponent
Add a new property to member-messages.component.ts
called newMessage
.
Also, add a new method called sendMessage()
:
Update MemberMessges Template
Next, in member-messages.component.html
- update the <form>
in the footer to:
It should work now! Open the browser and test it out.
Last updated