-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting error while openning Parent Node in Case of lazy loading. #64
Comments
Hi, |
Thanks for the reply ezraroi. |
@Rabi-Narayan, the right behavior in this case is to inject the necessary dependencies into your directive or controller before-hand either using resolve functions (for route navigation or, say, UIBS modals) or directly using promises. |
jsfile.txt
Hi ezraroi,
modified in the way u suggested to make empty array and pushed the response data but it failed to create child nodes and gives error while trying to open a parent node.
treeCtrl: error from js tree - {"error":"nodata","plugin":"core","id":"core_05","reason":"Could not load node","data":"{"id":"ajson1"}"}
my config and data to load initial tree is like this.Given some initial data to populate tree because it is not creating any node in other ways.
vm.treeData = [
{ id : 'ajson1', parent : '#', text : 'Simple root node', state: { opened: false},children:true },
{ id : 'ajson2', parent : '#', text : 'Root node 2', state: { opened: false},children:true },
];
I am getting data from http service like this:
var promise = ravensService.getChildren();
I am calling the follwing function on "open_node" event of jsTree.But before this event i am getting above error :(
vm.openChildNode = function()
{
vm.treeData.push(data.data);
};
I have tried all the stuffs and working on same from days but unable to find solution.I am using jsTree in Angularjs.Since i am new to this please help in this regard.Thanks in advance.PFA for Js.
The text was updated successfully, but these errors were encountered: