I'm trying to use the Navigation Service to refresh the tree when a node has been deleted. The issue that I'm running into is that it changes the active section to the "Content" section before I ever get to sync the tree. I'm basing the code on Tim Geyssen's "Umbraco Angular Backoffice Pages" repo (found @ https://github.com/TimGeyssens/UmbracoAngularBackofficePages).
Any ideas? Stepping through you can clearly see it selecting the "Content" section immediately so when it goes through the syncTree method it throws an error that it can't find my particular tree.
If I change the active section, do a timeout, and THEN sync the tree it will sync it fine. I saw this in a different thread on here, but that seems like a hack.
Custom Plug-in Sync Tree on Delete of Node
I'm trying to use the Navigation Service to refresh the tree when a node has been deleted. The issue that I'm running into is that it changes the active section to the "Content" section before I ever get to sync the tree. I'm basing the code on Tim Geyssen's "Umbraco Angular Backoffice Pages" repo (found @ https://github.com/TimGeyssens/UmbracoAngularBackofficePages).
delete.html
delete.controller.js
Any ideas? Stepping through you can clearly see it selecting the "Content" section immediately so when it goes through the syncTree method it throws an error that it can't find my particular tree.
If I change the active section, do a timeout, and THEN sync the tree it will sync it fine. I saw this in a different thread on here, but that seems like a hack.
Thanks!
Update on this. I tried switching to what Umbraco Forms does.
This still doesn't work because the content section is still loaded/active even though previously my custom section was loaded/active.
I should also note that my edit's save works fine. The code I have for that is like the following.
Thanks!
Well, I feel dumb now. I just realized my link had
href="#"
. Obviously, making ithref=""
fixes everything!is working on a reply...