Create a div tag in html file with specific id for example tree1 and write a specific function in javascript file to perform your business logic. An sample example as shown below:
HTML file:
<div id="tree1" class="ztree" ng-init="init()"></div>
Javascript file:
var data = {"name": "Java and its divisions","open": true,"children": [{ "name": "Java Standard Edition, J2SE" },{ "name": "Java Enterprise Edition, J2EE" },{ "name": "Java Mobile Edition, J2ME"}]};
$scope.init = function() {
tree();
}
function tree() {
zNodes = data;
$.fn.zTree.init($("#tree1"), setting, zNodes);
}