Book Image

Beginning Server-Side Application Development with Angular

By : Bram Borggreve
Book Image

Beginning Server-Side Application Development with Angular

By: Bram Borggreve

Overview of this book

Equip yourself with the skills required to create modern, progressive web applications that load quickly and efficiently. This fast-paced guide to server-side Angular leads you through an example application that uses Angular Universal to render application pages on the server, rather than the client. You'll learn how to serve your users views that load instantly, while reaping all the SEO benefits of improved page indexing. With differences of just 200 milliseconds in performance having a measurable impact on your users, it's more important than ever to get server-side right.
Table of Contents (10 chapters)

Types of Components


In this section, we will take a look at how we can differentiate our components by making a distinction between container and presentational components. Sometimes, they are also called smart and dumb components, referring to how much knowledge of the world outside of the components each of them has.

The main difference we can make is the following:

  • A presentational component is responsible for how things look

  • A container component is responsible for how things work

We will dive into more details of why this distinction is important when we create them, but we can give away a few things already.

Presentational Components

We can say the following about presentational components:

  • They get their data passed in using the @Input() decorator

  • Any operations are passed up using the @Output() decorator

  • They handle the markup and the styling of the application

  • They mostly just contain other presentational components

  • They have no knowledge (or dependencies) on any routes or services from...