I have this code to set the accordion menu:
function AccordionDemoCtrl($scope) {
$scope.oneAtTime = true;
$scope.links = [
{
img: '/web/bundles/lima3main/images/icon-l3play.png' ,
option: 'L3 Pay' ,
content: [
{
title: 'Single Payment'
},
{
title: 'Recurring Billing'
},
{
title: 'ACH'
}
]
},
{
img: '/web/bundles/lima3main/images/icon-l3bridge.png' ,
option: 'L3 Bridge' ,
content: []
},
{
img: '/web/bundles/lima3main/images/icon-l3connect.png' ,
option: 'L3 Connect' ,
content: []
},
{
img: '/web/bundles/lima3main/images/icon-costumerManagement.png' ,
option: 'Customer Management' ,
content: []
},
{
img: '/web/bundles/lima3main/images/icon-productManagement.png' ,
option: 'Product Management' ,
content: []
},
{
img: '/web/bundles/lima3main/images/icon-invoiceManagement.png' ,
option: 'Invoice Management' ,
content: []
},
{
img: '/web/bundles/lima3main/images/icon-reports.png' ,
option: 'Reports' ,
content: []
},
{
img: '/web/bundles/lima3main/images/icon-alerts.png' ,
option: 'Alerts' ,
content: []
}
];
}
So, in the view i did a ng-repeat for each item:
<div ng-app="accordion-base" >
<div ng-controller="AccordionDemoCtrl">
<accordion close-others="oneAtTime">
<accordion-group ng-repeat="link in links">
<accordion-heading>
<img class="marginleft" src="{{link.img}}">
{{link.option}}
</accordion-heading>
<div ng-if="link.content != 0">
<ul>
<li ng-repeat="content in link.content">{{content.title}}</li>
</ul>
</div>
</accordion-group>
</accordion>
</div>
</div>
But when i click in items that have the object content empty, the accordion appears like this:

Is there any way to cancel the accordion functionality for those items ?