I want to have a set of reusable widgets which can be used anywhere in the application. For ex. I want to have a settings menu and the menu items defined as nested custom tags. I want to be able to send events from the menu items or menu to the parent context (either the controller in parent directive or whatever).
But I figured out some strange things with scope (maybe I misunderstood something):
<panel title="clock">
<clock timezone="MST"></clock>
<clock timezone="MST"></clock>
<clock timezone="MST"></clock>
</panel>
The following example doesn't fire the event to the parent directive controller when click on the items: http://jsfiddle.net/9VTfR/2/.
But the following works fine: http://jsfiddle.net/9VTfR/3/.
Also I got some strange JS error in the console for both options.
So is it possible to catch the events at any level as the parent directive should be the parent scope as well (not only the parent controller), no? Any help would be appreciated.