Activity

Create a component which shows the articles from a list. If the article is a text article show a component like this:

activity example 1

Tip

To get the blue border use the class card-outline-primary

If the article is an image article show a component like this:

activity example 2

Tip

To get the red border use the class card-outline-danger

Tip

Use the shortDate date format string to get the date formatted as we want.

Steps

Fork this plunker:

Use the built-in directives you’ve just learned to finish off the RecentArticlesComponent.

Solution

When you are ready compare your answer to the solution in this plunker:


Learn Angular 5 For FREE

I've released my 700 page Kick Starter funded Angular 5 book for FREE