© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
V. H. GarciaGetting Started with Angularhttps://doi.org/10.1007/978-1-4842-9206-8_10

10. Blog App Part 5: Adding Posts

Victor Hugo Garcia1  
(1)
Santiago Del Estero, Santiago del Estero, Argentina
 

In this chapter, we will add the necessary functionality to register new posts. For this, we will design a simple form, with two fields to complete: the title and text of the post. In addition, as part of the data that will be sent to the backend, we will include the user id so that they can be filtered when the user enters their dashboard.

AddPost Component

Generate a new component:
ng g c components/addPost
Replace the content of add-post.component.ts with the following: ...

Get Getting Started with Angular: Create and Deploy Angular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.