Book Image

Mastering Angular Components - Second Edition

By : Gion Kunz
Book Image

Mastering Angular Components - Second Edition

By: Gion Kunz

Overview of this book

Mastering Angular Components will help you learn how to invent, build, and manage shared and reusable components for your web projects. Angular components are an integral part of any Angular app and are responsible for performing specific tasks in controlling the user interface. Complete with detailed explanations of essential concepts and practical examples, the book begins by helping you build basic layout components, along with developing a fully functional task-management application using Angular. You’ll then learn how to create layout components and build clean data and state architecture for your application. The book will even help you understand component-based routing and create components that render Scalable Vector Graphics (SVG). Toward the concluding chapters, you’ll be able to visualize data using the third-party library Chartist and create a plugin architecture using Angular components. By the end of this book, you will have mastered the component-based architecture in Angular and have the skills you need to build modern and clean user interfaces.
Table of Contents (12 chapters)

Task details

So far, our task list was sufficient enough to display all details of tasks directly in the listing. However, as we will add more details to tasks in this chapter, it's time to provide a detailed view where users can edit the task.

We already laid the groundwork for project navigation using the router in Chapter 5, Component-Based Routing. Adding a new routable component that we'll use in the context of our projects will be a breeze.

Before we start creating a new task details component, let's introduce a new state within our task model. Users should have the additional option to provide a task description in addition to the task title. This description will be editable on the task details view.

Let's open our model file, located in src/app/model.ts, and add an optional description field to our task interface:



export interface Task {
readonly...