You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have used vm.treeConfig.version++ . and i can see in the log that tree version is increasing but tree not reloading.
app.controller('treeCtrl')// Controller For Tree
{
var vm = this;
vm.ignoreChanges = false;
vm.treeData = [];//
$scope.getTreeData = function () {
var getData = channelServices.getTree();
getData.then(function (chn) {
//console.log(chn.data);
for (var i = 0; i < chn.data.length; i++) {
vm.treeData.push({
id: chn.data[i].id, parent: chn.data[i].parent, text: chn.data[i].text,
type: chn.data[i].type, state: { checkbox_disabled: chn.data[i].checkboxdisabled, opened:
chn.data[i].opened, disabled: chn.data[i].disabled }, image: 'yasin'
})
}
scope. reloadTree();
}, function (chn) {
toastr.error(chn.data, 'Oh My!');
});
};
vm.treeConfig ={......}//config for tree
$scope.reloadTree = function () {//reload tree
vm.treeConfig.version++;
console.log(vm.treeConfig.version);
};
}
app.cotroller('modelCtrl')//model popup controller
{
$scope.UpdateNode=function(){
//update into server using http$
$scope.$parent..reloadTree();
};
}
each time when i call function "UpdateNode" from modal popup can see tree version is increasing but tree not recreating with updated data from the server
The text was updated successfully, but these errors were encountered:
smohammedyasin
changed the title
how to ReloadTree from another controller
ReloadTree from the DataBase once Updated Data into server
May 1, 2017
Hello,
i have used vm.treeConfig.version++ . and i can see in the log that tree version is increasing but tree not reloading.
each time when i call function "UpdateNode" from modal popup can see tree version is increasing but tree not recreating with updated data from the server
The text was updated successfully, but these errors were encountered: