I'm working on a list(<ul>), that is used multiple times inside different ng-repeat-iterations on one page.
The first list-items are generated by ng-repeat, the (second-)last list-item contains a span, which when clicked on, should cause the last list-item(hidden on page load) to show
<ul ng-repeat="list in lists">
<li ng-repeat="item in getItems(a,b)">{{item}}
</li>
<li>
<span style="cursor:pointer;" ng-click="display_item_form($event)" class="glyphicon glyphicon-plus"></span>
</li>
<li style="display: none;" class="item-form">
content to be shown on 'button' press
</li>
</ul>
Apart from passing $event, i tried passing 'this', but the result is always undefined or an exception
$scope.display_item_form = function($event){
// alert($(it).parent().siblings('.item-form').attr('type'));//passing this instead of $event: result: undefined
alert($($event.target).attr('type')); //undefined
// $(it).parent().parent().children('.item-form').show();
// $('.item-form').show(); // this works, but i only want .item-form inside the current <ul> to be shown
}
getItems()?getItemsfunction.