Building the comments component

The last missing piece of the puzzle for our commenting system is the comments component, which will list all the comments and provide the UI to create new comments:

The comments component allows users to add comments to projects

Let's use the Angular CLI to create the structure for our comments component:

ng generate component --spec false -ve none -cd onpush comments/comments/comments

First, let's edit the template of our comments component located in src/app/comments/comments/comments.component.html:

<div class="title">Add new comment</div><div class="add-comment-section">  <div #commentContentEditable class="add-comment-box" ...

Get Mastering Angular Components now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.