Nested accordion list

Hey guys. Did anyone try to create the nested accordion list in Ionic, please? I need maybe 3 or 4 levels, not just one like in the demo.

Have you found a solution? I’m also wanting to create this, but for just 2 levels.

This might help.

See the Pen Ionic - Accordion with sub items by Leftyx (@Leftyx) on CodePen.

I’ve wroted this directive, it works nested too

change original controller.js

$scope.shownGroup = [];
$scope.toggleGroup = function (group) {
if ($scope.isGroupShown(group)) {
$scope.shownGroup.splice($scope.shownGroup.indexOf(group), 1);
} else {
$scope.isGroupShown = function (group) {
return $scope.shownGroup.indexOf(group) > -1;


I’ve found this example but it stops at 3rd level (leaf nodes only). I think adding more level (e.g. up to 5) can be too much tricky. What do you think?