I want to create a transclude directive using this HTML :
%h2 Widgets :
.row-fluid{ "ng-controller" => "ApplicationDashboardCtrl" }
.span6
%widget{ type: "chart", "ng-model" => "widget", "ng-repeat" => "widget in widgets","ng-transclude" => "" }
.chart.bottom20
{{ widget.title }}
%data-source{ src: "/public/test.json"}
%lines{ y: "value", x: "label" }
.span6
The issue is, my two directives does not share the same scope instance. I created a plinkr to represent my issue :
I do not understand why my two directives does not share the same scope and why my "widget" directive does not catch the event "setupExtra". I know, I can use the $rootScope but I wanted to do without it.
Any idea?