Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yves Kircher 21 posts 69 karma points
    Oct 07, 2014 @ 15:29
    Yves Kircher
    0

    Getting the current Node

    Hey,

    i have a problem getting the current "tree node Object" in my angular controller.

    Under $scope.$parent.$parent.$parent.$parent.$parent.$parent.currentNode i can find it, but there must be an easier way to get the current Node in my Backend Controller.

    So simply: how to get current Node Object in my Controller, with children?

    Thx for any Help

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 08, 2014 @ 08:14
    Dave Woestenborghs
    0

    You can insert editorState as dependency in your angular controller.

    Than you do this

    editorState.current

    Dave

  • Yves Kircher 21 posts 69 karma points
    Oct 08, 2014 @ 10:52
    Yves Kircher
    0

    This node is not the one i need.
    I need the Node looks like the one on the image


     

    this is what :  
    //args.node = $scope.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$parent.$parent.currentNode;
     shows me, but there must be an easyer way, because if i try this i need a timeout Function waiting until currentNode is loaded in scope

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 08, 2014 @ 11:20
    Dave Woestenborghs
    0

    When I call editorState.current i get the current node that is being edited. Isn't that what you want ?

    Maybe you can try to explain what you are trying to achieve ?

    Dave

  • Yves Kircher 21 posts 69 karma points
    Oct 08, 2014 @ 11:32
    Yves Kircher
    0

    What you get is the content, but i need the node with childNodeUrl :/

     

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Oct 08, 2014 @ 11:40
    Dave Woestenborghs
    0

    Still not clear to me what you are trying to achieve. If you can explain that maybe that helps to find a solution.

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft