iI have this directive :
amDirective.directive('directiveList', function() {
return {
restrict: 'A',
scope: {
'event': '&onEvent'
},
transclude: true,
templateUrl: ''
};
});
and in my page html
<div data-dy-directive-list data-elements="elements" on-event="listItemClicked(item)"></div>
and in my directive- template html
<table class="table" data-ng-show="elements!=null && elements.length>0">
<tr data-ng-repeat="element in elements">
<td><span data-ng-click="event(element)">{{element.title}}</span></td>
</tr>
<tr></tr>
</table>
How can I pass in my directive the complex object "item"?