需要使用手风琴的树视图

时间:2017-12-15 07:40:16

标签: html angularjs accordion

我正在使用Accordian,但试图显示树视图

请参阅以下样本以供参考。 Preview

var app = angular.module('plunker', ['ui.bootstrap']);

app.controller('MainController',
  function($scope) {
    $scope.items = [{
      name: "Products",
      desc: "Products",
      subitems: [{
        name: "Pricing",
        desc: "Pricing",
        subitems: [{
          name: "Personal",
          desc: "Personal",
          subitems: [{
            name: "R and d",
            desc: "R and d",

          }]

        }, {
          name: "subitem2",
          desc: "Sub-Item 2"
        }]
      }, {
        name: "Software",
        desc: "Software"
      }, {
        name: "Hardware",
        desc: "Hardware"
      }]
    }, {
      name: "HP",
      desc: "HP",

    }];

    $scope.default = $scope.items[2];
  });

我需要将手风琴显示如下图所示。

image

0 个答案:

没有答案