Git Product home page Git Product logo

Comments (5)

yoavaa avatar yoavaa commented on August 15, 2024

You have an alternate name for the children property, as in
http://wix.github.io/angular-tree-control/#children

Does that answer your need?

from angular-tree-control.

laerciokonzenGV avatar laerciokonzenGV commented on August 15, 2024

I need this to, but in my case, i have multiple names for each child, like this:

   [{
        id: 1,
        label: "Empresa 1",
        unidade: [{
            id: 2,
            label: "Unidade 2",
            curso: [{
                id: 3,
                label: "Curso",
                ciclo: [{
                    id: 4,
                    label: "Ciclo 1"
                }, {
                    id: 5,
                    label: "Ciclo 2"
                }, {
                    id: 6,
                    label: "Ciclo 3"
                }, {
                    id: 7,
                    label: "Ciclo 4"
                }]
            }]
        }]
     }]

from angular-tree-control.

yoavaa avatar yoavaa commented on August 15, 2024

not sure I can help you given such a model. How do you imagine a tree component handling such a case?

I think the best option for you is to transform your data into a structure that is more friendly for the tree control (e.g. having only one children property name).

from angular-tree-control.

laerciokonzenGV avatar laerciokonzenGV commented on August 15, 2024

Ok @yoavaa, thanks for this comment, I asked the boy to the backend to make this change.

But now I have another question, how do I get a way to access the DOM of the node.
eg;

<div treecontrol class="tree-light"
     tree-model="treedata"
     expanded-nodes="expandedNodes"
     options="treeOptions">
    <input type="checkbox"
           ng-checked="node.Liberado"
           ng-click="checkAll(node, $parent)" />
    {{node.Label}}
</div>

I need to access the parent from the node on checkAll(node...)

from angular-tree-control.

yoavaa avatar yoavaa commented on August 15, 2024

You have that option via the $parentNode member of the label scope
see at http://wix.github.io/angular-tree-control/#labels-template

from angular-tree-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.