<select ng-model="Category.CategoryId" ng-options="template.CategoryId as template.CategoryName for template in Adminsubcat">
<option value="" selected="selected">Select a Category</option>
<option ng-repeat="j in template.Adminsubcat">{{j.CategoryName}}</option>
</select>
data stored in my JSON file
"GetadminClassifiedCategoryListResult":
[
{
"AddedBy": 0,
"AddedOn": null,
"CategoryIcon": "icon-library_books",
"CategoryId": 221,
"CategoryName": "FBVGSDFBDFBDF",
"ClassifiedSubCategory":
[
{
"AddedBy": 0,
"AddedOn": null,
"CategoryIcon": "",
"CategoryId": 238,
"CategoryName": "zcvb",
"DeletedBy": 0,
"DeletedOn": null,
"IsActive": false,
"ModifiedBy": 0,
"ModifiedOn": null,
"ParentCategoryId": 221
},
{...}
],
"DeletedBy": 0,
"DeletedOn": null,
"IsActive": false,
"ModifiedBy": 0,
"ModifiedOn": null,
"ParentCategoryId": 0
},
The JSON data contains a list of subcategories within the ClassifiedSubCategory object. I would like to create a multi-level dropdown with multi-select options. Is this achievable using AngularJS select or should I consider using ul li elements? Please suggest any available JavaScript libraries. Can this be done using ng-repeat to start building the tree structure?
Categories:
Subcategory
Subcategory