An real world example is visible in the homepage of our website, http://www.unshift.xyz or in the following video:
In the second part of the tutorial, the xyzPanel directive just created will become a child of a new xyzAccordion directive.
Why? So far every panel was independent. But what should we do in order to manage a group of panels? And more concretely, how can we automatically close all the panels when a new one is opened?
One possible solution is:
wrap all the panels into a new directive that will expose a set of common methods, as show below.