Exercise: Pipes and Observables

Let’s practice handling `Observables` with `AsyncPipe` and `NgIf`.

We'll cover the following

Objectives

We want to change the user profile card we implemented recently so that it works well with a fully asynchronous way of getting the user data. Below are the specific requirements:

  • The user data should be fetched using UserService.

  • The subscription to Observable user data should be in the template when we use AsyncPipe.

  • Inside the card, the fullname pipe should allow us to render the user name and last name.

  • Inside the card, the accountType pipe should allow us to render the type of account.

Task

Let’s write the code below:

Get hands-on with 1200+ tech skills courses.