ezraroi / ngJsTree

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

angular js , ng-model not ready #95

Closed justinhomes closed 7 years ago

justinhomes commented 7 years ago

I am using https://github.com/ezraroi/ngJsTree and I have come across the following problem.

My ng-model is a AJAX request and when my controller fires, data is not yet ready, so it does not render anything.

<div ng-controller='myCtrl'>
    <div js-tree="treeConfig" ng-model="treeData" should-apply="ignoreModelChanges()" tree="treeInstance" tree-events="ready:readyCB;create_node:createNodeCB"></div>
</div>

https://plnkr.co/edit/fCrupsxDMprHdLCocZIe?p=preview

ezraroi commented 7 years ago

you are missingng-app="plunker" and also check the browser console, your application is not working.. Angular is not loaded

justinhomes commented 7 years ago

i have fixed the plunker for the problem still exists.

ezraroi commented 7 years ago

you are missing treeConfig