I just can't get how AngularJS scope works.
I have an ui-tabs Directive, with a tab controller. This is supposed to handle tabbed content.
This tab directive can contains 2 others directive, heading-template Directive, which is the template for the tab heading, and tab-pane Directive, which is the panes to show/hide.
The tab directive can have 2 behaviors : if the attr templated
is on the element, then we use an empty template, and we will use later the heading-template Directive to generate tabs heading.
Else, we use a template which generates ul list with each panes title.
The problem is the heading-template Directive : this Directive simply binds the ng-repeat Directive to the template and compiles it.
But I can't have access to the scope.panes
, which are located in Tab Directive's controller scope
. The directive simply don't find them, and I don't understand why.
Here's the JSFiddle : http://jsfiddle.net/whitep4nther/mwk9gp9x/
Thank you for your help, I'm turning crazy