I make a simple demo of jstree using angular js .I read this documentation https://github.com/ezraroi/ngJsTree before making the example
Both codepen have same JS Code .But one code pen show "folder image " and another don't why ..? http://codepen.io/anon/pen/mVRarZ?editors=101
http://codepen.io/anon/pen/JGEwPv?editors=101
if I replace second codepen JS code to first codepen js it show the folder..But I don't understand what is the difference in in JS ..why first codepen show folder and another don't
angular.module('app',['ngJsTree']).controller('myCtrl',function($scope,$log){
$scope.treeConfig = {
core : {
multiple : false,
animation: true,
error : function(error) {
$log.error('treeCtrl: error from js tree - ' + angular.toJson(error));
},
check_callback: true,
worker : true
},
types : {
default : {
icon : 'glyphicon glyphicon-flash'
},
star : {
icon : 'glyphicon glyphicon-star'
},
cloud : {
icon : 'glyphicon glyphicon-cloud'
}
},
version : 1,
plugins : ['types','checkbox']
};
$scope.originalData = [
{ id : 'ajson1', parent : '#', text : 'Simple root node', state: { opened: true} },
{ id : 'ajson2', parent : '#', text : 'Root node 2', state: { opened: true} },
{ id : 'ajson3', parent : 'ajson2', text : 'Child 1', state: { opened: true} },
{ id : 'ajson4', parent : 'ajson2', text : 'Child 2' , state: { opened: true}}
];
$scope.treeData = [];
angular.copy($scope.originalData,$scope.treeData);
})