I am new to AngularJs and facing a challenge with a complex JSON structure that I need to use for an auto complete feature.
I want to create an auto complete for only the child elements within the structure, without displaying the parent categories.
Accessing the parent categories is straightforward, by using data[2].JobCategories and binding it to ng-repeat, along with binding "jobParentCategoryModel.JobCategoryName" to the model.
However, figuring out how to isolate the children only in an angular-friendly manner is where I am struggling. My instinct tells me to extract only the children from the factory into a new array of category children and work with that, but something feels off about drilling into the factory directly. I can't quite put my finger on it, but it just doesn't seem like the angular way of doing things to me.
On a side note, I noticed many nested ng-repeat examples in my research, but I want to avoid creating extra parent DOM elements for each child, as using nested repeats seems excessive. Yet, I also do not want to compromise the integrity of the data structure (it is not two-way binding, so I am unsure if modifying the model matters at all).
What is the recommended approach for handling such deep drill downs in Angular?