Example: Button State Change Animation
Learn how to combine CSS transitions with Angular's features to create a button state change animation.
We'll cover the following...
We'll cover the following...
Scenario
Let’s create another button animation, but this time, the transition will be applied when the button’s state changes from its default clickable state to a disabled state.
This will be a slightly different approach from the previous examples in this chapter because this involves adding and removing a class to modify the style of the button and therefore, howthe transition is triggered. We’ll use Angular’s class binding to conditionally add the disabled class.
Note: We’ll create the animation in ...