Exercise: The Built-in `NgClass` Directive
Let's practice working with `NgClass` directive.
An NgClass
with a string expression
Now, let’s get ready for a quick task.
Objectives
In this task, we’ll improve a button component from the previous lesson.
There are four classes that can be applied to a button:
- The
app-button
class can be used for default styles of any button. - The
warn-button
class styles buttons in red. - The
primary-button
class styles buttons to use primary design colors. - The
secondary-button
class styles
Get hands-on with 1400+ tech skills courses.