Custom tree property editor (ukfest-angularjs-demo) - model.value is not being updated with selected node
Hi there,
I am using the ukfest-angularjs-demo in my build (very helpful).
I had to do few tweaks (file locations, paths and changes to reload the tree (http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/48422-Reloading-custom-tree-problems-(UKFest-Angular-JS-Demo)
But other than that it is all the same. I have a problem when trying to update content using the person picker property editor. The tree loads ok, and when I click a node the treeNodeSelect is being fired and also the populate() is being called. But model.value is not updated. The link 'Pick Person' remains as it is, and not showing the selected person, and when saving the content to the database no 'person' property is being set.
The event is fired and I do get to
$scope.submit(args.node.id);
in
$scope.dialogEventHandler.bind("treeNodeSelect", function (ev, args) {
args.event.preventDefault();
args.event.stopPropagation();
$scope.submit(args.node.id);
});
and the callback populate() is being called:
function populate(data) {
$scope.model.value = data;
};
But model.value in the template (personpicker.html) is not being updated. I added a function that alerts for the model.vale - and it returns the correct value, but the actual template is not being updated, and also the value is not being saved to the database when saving the content.
Custom tree property editor (ukfest-angularjs-demo) - model.value is not being updated with selected node
Hi there,
I am using the ukfest-angularjs-demo in my build (very helpful).
I had to do few tweaks (file locations, paths and changes to reload the tree (http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/48422-Reloading-custom-tree-problems-(UKFest-Angular-JS-Demo)
But other than that it is all the same. I have a problem when trying to update content using the person picker property editor. The tree loads ok, and when I click a node the treeNodeSelect is being fired and also the populate() is being called. But model.value is not updated. The link 'Pick Person' remains as it is, and not showing the selected person, and when saving the content to the database no 'person' property is being set.
The event is fired and I do get to
in
and the callback populate() is being called:
But model.value in the template (personpicker.html) is not being updated. I added a function that alerts for the model.vale - and it returns the correct value, but the actual template is not being updated, and also the value is not being saved to the database when saving the content.
(getValue just alerts model.value)
any ideas?
Thanks!
The issue was that apply had to be called.
The following changes to personpicker.controller.js fixed the issue for me:
is working on a reply...