Say I have the following two directives in my page:
<todos></todos>
<calendar></calendar>
The file structure is set up as follows:
/todos
todo-controller.js
todo-directive.js
todo-view.html
/calendar
calendar-controller.js
calendar-directive.js
calendar-view.html
Since these two directives are "on the same level" and one is not contained inside the other this doesnt allow me to use the require syntax in my directive to do something like this in the todo controller:
CalendarCtrl.foo()
Right now Im using lots of broadcast and on listeners and its getting very messy. How do I more easily share functionality between these and keep my file structure the same?