I have two fiddles that have the same jstree loading in. One is wrapped in an angular directive, the other is not. I am new to angular. I am not seeing any of the images in the angular version. Also the animations do not work. Am I missing a jstree plugin, or do I need to add a bind function that will add in this functionality?
Here is the fiddle: (not in angular js)
Here is the simple js tree code :
$('#tree').jstree({
'plugins' : ['themes', 'json_data', 'checkbox', 'types'],
'icon':false,
'checkbox' : {
'two_state' : true // Nessesary to disable default checking childrens
},
"json_data" : {
"data" : [
{
"data" : "Basics",
"state" : "open",
"children" : [{
"data" : "login",
"state" : "closed",
"children" : [ "login", {"data" : "results", "state" : "open"} ]
},
{
"data" : "Basics",
"state" : "closed",
"children" : [ "login", "something",{"data" : "results", "state" : "closed"} ]
}
]
},
{
"data" : "All",
"state" : "closed",
"children" : [ {
"data" : "AddCustomer",
"state" : "closed",
"children" : [ "login","Add", {"data" : "results", "state" : "closed"} ]
} ]
}
]
},
"types" : {
"types": {
"disabled" : { // Defining new type 'disabled'
"check_node" : false,
"uncheck_node" : false
},
"default" : { // Override default functionality
"check_node" : function (node) {
$(node).children('ul').children('li').children('a').children('.jstree-checkbox').click();
return true;
},
"uncheck_node" : function (node) {
$(node).children('ul').children('li').children('a').children('.jstree-checkbox').click();
return true;
}
}
}
}
});
Here is a plunker with the angular directive: