ezraroi / ngJsTree

Angular Directive for the famous JS Tree
http://ezraroi.github.io/ngJsTree/
MIT License
270 stars 101 forks source link

getting error on using ngJsTree in a modal #120

Open mjseyyedi opened 7 years ago

mjseyyedi commented 7 years ago

Hi, I'm using your library in a modal, but I have two problem : 1- sometimes when I want to open my modal , I got the error below

angular.js:9192 TypeError: b.tree.jstree is not a function at g.b.destroy (ngJsTree.min.js:1) at Object.fn (ngJsTree.min.js:1) at g.$digest (angular.js:11623) at a.$apply (angular.js:11870) at HTMLButtonElement. (angular.js:17434) at angular.js:2382 at r (angular.js:332) at HTMLButtonElement.c (angular.js:2383)

and when I refresh the page , it's OK.

2- the second problem is that , when I close the modal an reopen it in multiple times , during the time of dnd , I have the error below.

menuManagerController.js:368 Uncaught TypeError: $scope.treeInstance.jstree(...).get_json is not a function at HTMLDocument. (menuManagerController.js:368) at HTMLDocument.dispatch (jquery-1.11.0.min.js:3) at HTMLDocument.r.handle (jquery-1.11.0.min.js:3) at Object.trigger (jquery-1.11.0.min.js:3) at m.fn.init.triggerHandler (jquery-1.11.0.min.js:3) at Object._trigger (jstree.js:6899) at HTMLDocument.stop (jstree.js:7118) at HTMLDocument.dispatch (jquery-1.11.0.min.js:3) at HTMLDocument.r.handle (jquery-1.11.0.min.js:3)

I will be pleased if you help me.