how to show static data on jstree using angular-jstree.js plugin

你说的曾经没有我的故事 提交于 2019-12-25 07:13:28

问题


I am trying to use jstree(http://www.jstree.com/) in angular .So I find there is a way to use jstree with angular. https://github.com/akhikhl/angularjs-jstree But in that there is no documentation to show data.I follow all steps given in documentation .But I know it didn't display tree view because I didn't take data .can you please tell how I will show static data so that it display tree view. Here is my plunker. http://plnkr.co/edit/L6n71QsGRAoYqyZuftQM?p=catalogue

  <!DOCTYPE html>
    <html>

      <head>
        <link data-require="bootstrap-css@3.x" data-semver="3.2.0" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" />
        <link data-require="bootstrap-css@3.x" data-semver="3.2.0" rel="stylesheet" href="  https://dl.dropboxusercontent.com/s/fffuk9v7si67i0w/style.min.css" />
        <script data-require="angular.js@*" data-semver="1.3.0-beta.5" src="https://code.angularjs.org/1.3.0-beta.5/angular.js"></script>
        <script data-require="ui-bootstrap@0.10.0" data-semver="0.10.0" src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.10.0.js"></script>
        <script data-require="jquery@2.1.1" data-semver="2.1.1" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
        <link rel="stylesheet" href="style.css" />
        <script src="script.js"></script>
            <script src="https://dl.dropboxusercontent.com/s/thhtr6t43i59dzy/jstree.min.js?m=
    "></script>

        <script src=" https://dl.dropboxusercontent.com/s/0tyskgjpg9ox0ox/angular-jstree.js?m="></script>
      </head>

       <body ng-app="myApp">
        <div ng-controller="TreeDemoCtrl">
          <div class="part treeContainer" popover="Expand/collapse nodes, click on nodes" popover-trigger="mouseenter" popover-placement="right">
            <div jstree children-url="treeUrl" path-to-ids-url="pathIds" selected-node="selectedTreeNode"></div>
          </div>

        </div>

      </body>

    </html>

Please add some static data so that it display tree view..It mean like that as in image

Please show only static data

How to add static data with jstree ?

来源:https://stackoverflow.com/questions/25227719/how-to-show-static-data-on-jstree-using-angular-jstree-js-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!