Practice 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 blitz:

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

Solution


Caught a mistake or want to contribute to the book? Edit this page on GitHub!