Hi Team,
template: "{common.icon()}<span><a href='##link#' style='text-decoration: none;'>{common.folder()}#value#</a></span>",
if i am using this template without angular its working fine but same with angular is not working. Tree is getting refreshed on first time tree node click.
My code is like this
app.controller("TreeController", ['$scope', '$http', '$rootScope', '$timeout','$location', function($scope, $http, $rootScope, $timeout,$location) {
$rootScope.treeData=[];
$scope.tree_config = {
id: "testTree",
view: "tree",
select: true,
activeTitle:true,
template: "{common.icon()}<span><a href='##link#' style='text-decoration: none;'>{common.folder()}#value#</a></span>",
data: [{
id: 'root',
value: 'fams',
webix_kids: true,
link: '/fams',
open: true,
}],
ready: function() {
this.select("root", true);
},
on: {
onDataRequest: function(id, callback, url) {
this.parse(
webix.ajax().post("loadTree?parent=" + id + "&sessionKey=" + sessionKey + "&treeName=TestOrderProjectTree&moduleName=Test Order Management&node=" + id).then(function(data) {
return data = data.json();
})
);
return false;
},
onItemClick: function(id, e, node) {
selectedProjectId = this.getItem(id).uid;
var nodeType = this.getItem(id).nodeType;
switch (nodeType) {
case 'Project':
{
$timeout(function() {
$rootScope.$broadcast("CallProjectDetailsMethod", selectedProjectId);
}, 200);
break;
}
case 'SubProject':
{
$timeout(function() {
$rootScope.$broadcast("CallSubProjectDetailsMethod", selectedProjectId);
}, 200);
break;
}
}
}
},
};
}]);
Thanks,
Mira Karale