mardi 4 août 2015

Filtered list with parent items - selected by cursor arrows. AngularJs

In my form i have input with dropdown, in dropdown I show json data like:

{"title": "Parent #1",
            "child" : [
                {"title":  "Child ##1"},
                {"title":  "Child ##2"},
                {"title":  "Child ##3"},
                {"title":  "Child ##4"}
            ]
        }

I bind it to such html:

<div class='dropDownContainer'>
<div class='filteredItemContainer'>
<ul>
<h5>Parent title</h5>
<ul>
<li>Child items</li>
<li>Child items</li>
<ul>
</ul
</div>
</div>

User can select any item - parent or child. I need to add possibility select item by cursor. How i can implement such functionality? I know how to do with simple ul list, but i don't know how to do it with such structure.

Aucun commentaire:

Enregistrer un commentaire