Modern Angular Design PatternsBuy the book
PreviousNext

Chapter 3: Component-Driven Development

Designing, implementing, and composing components as the fundamental unit of the UI.

  • Inputs and outputs
  • Content projection
  • Composition
  • OnPush

What you can try in this demo

Ten demos build components the modern way: input() and output() for parent-child communication, viewChild() for direct access, and a shopping cart assembled by composition. A reusable button, OnPush change detection, and content projection with single, named and conditional slots round it out.

This demo is chapter 3 of Modern Angular Design Patterns. The book walks through the code behind it.

Buy the book