Comments Service

Let's add a service to add comments on the events and write unit tests for this service.

Now that our event view is in place, we’re ready to start adding some additional functionality to this page in addition to the existing event details. The first feature we’ll add is the ability for users to post comments about an event. We’ll start by creating the service for comments.

First, create the service and its associated model.

ng g service services/comments/comments
ng g interface services/comments/comment

Get hands-on with 1200+ tech skills courses.