Recap

In this topic, we learned how to use SVG in order to create graphical and interactive components with Angular. By creating attribute bindings on our SVG elements and controlling the instantiation of graphical elements using the ngFor and ngIf directives, we built a custom slider component that provides a nice overview of our activities. At the same time, we also learned how to handle user input using the @HostListener decorator, in order to make our component interactive:

A screenshot of the finished activity slider component

To sum things up, we learned about the following concepts:

  • Encapsulating component views using ViewEncapsulation.Native ...

Get Mastering Angular Components now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.