目标:根据数据生成动态菜单,希望可以根据判断是否有子集无限循环下去. 菜单希望的样子是这样的: 菜单数据是这样的: $scope.expanders = [{ title: 'title1', link: 'xx/xx', child:[ { title: 'child2', link: 'xx/xx' }, { title: 'child3', link: 'xx/xx', child:[ { title: 'child5', link: 'xx/xx' } ] } ] }, { title:…