I'm building my first angularjs app, and still struggling with the scopes and stuff.
I'm trying to build a multi level tree, where I can edit nodes to become sub-nodes, or get them one level up (from sub node to parent), but I'm kind of stuck.
So far, I managed to set a root node as a sub-node. But set a sub-node as a root node is a whole different story, because I have to access the parent node, which right now I don't know how to do.
Any idea of how I can change a sub-node to a root node? Thanks
Edit:
Imagine this tree:
- Item 1
- Sub Item 1.1 [button 1]
- Sub Item 1.2 [button 2]
- Item 2
- Item 3
- Item 4
You click the [button 2] and you got this:
- Item 1
- Sub Item 1.1
- Sub Item 1.2
- Item 2
- Item 3
- Item 4