Solution: The Built-in `NgClass` Directive

An NgClass with a string expression

Let’s take a look at the task where we implemented an NgClass with a string expression.

Solution

Here’s an example of what the solution for this task may look like:

Get hands-on with 1200+ tech skills courses.