Copied to clipboard

Flag this post as spam?

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


  • Kim Holzmann 17 posts 97 karma points c-trib
    Nov 09, 2015 @ 08:29
    Kim Holzmann
    0

    synctree / navigationservice issue

    Problem with synctree / navigationservice. 1. Works first time executed. 2. works after refres site. 3. Works if the parent node is expanded. 4. If parent node is collapsed - the selectede node i highlighted, but tree is not expanding down to the selectede node.

    I have tryede with and without location.url with same result. The selected node is being renderedand showed at expactede, but not the tree location and highlightning.

    below the tree ways I have tryed.

     // try 1
    $scope.synctree = () => {
        var umbracouserId = $scope.invoices[0].UmbracoUserId;
        var invoiceId = $scope.invoices[0].Id;
        $scope.treeControllerName = 'ProductionTree';
                    $scope.aliasPath = ["user-" + umbracouserId, "order-" + umbracouserId, "order-" + invoiceId];
                    navigationService.syncTree({ tree: $scope.treeControllerName, path: $scope.aliasPath, forceReload: true, active: true }).then(function (nodePath) {
                        $location.url(nodePath.node.routePath + "#" + $scope.treeControllerName);
                    });
    
    }
    // try 2
    $scope.synctree = () => {
        var umbracouserId = $scope.invoices[0].UmbracoUserId;
        var invoiceId = $scope.invoices[0].Id;
        $scope.treeControllerName = 'ProductionTree';
                    $scope.aliasPath = ["user-" + umbracouserId, "order-" + umbracouserId, "order-" + invoiceId];
                    navigationService.syncTree({ tree: $scope.treeControllerName, path: $scope.aliasPath, forceReload: true, active: true }).then(function (nodePath) {
                        $location.url(nodePath.node.routePath);
                    });
    
    }
    // try 3
    $scope.synctree = () => {
        var umbracouserId = $scope.invoices[0].UmbracoUserId;
        var invoiceId = $scope.invoices[0].Id;
        $scope.treeControllerName = 'ProductionTree';
                    $scope.aliasPath = ["user-" + umbracouserId, "order-" + umbracouserId, "order-" + invoiceId];
                    navigationService.syncTree({ tree: $scope.treeControllerName, path: $scope.aliasPath, forceReload: true, active: true });
    
    }
    

    Best regards Kim Holzmann

Please Sign in or register to post replies

Write your reply to:

Draft