TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sujeet Raman
860
927
354.5k
how to bind nested json data dropdown in angular 2
Apr 19 2019 9:29 AM
i have class
items:[
{id:1,name:a,isChecked:false},
{id:2,name:b,isChecked:false},
{id:3,name:c,isChecked:false},
{id:4,name:d,isChecked:false},
from this class i got a checkbox dropdown cleanly using
<div *ngIf="searchTerm&&isExpanded" data-simplebar >
<div class="tab" *ngFor = "let item of items" >
<span >
{{item.name}}
</span>
<input class="checkbox" #myId type="checkbox" value="item.isChecked" [(ngModel)]="item.isChecked" (change)="ButtonClick()" >
</div>
</div>
.Now i want to get dropdown as parent child list with checkbox means
parentA []
child1[]
child2[]
child 3 []
parentB
child1
child2
child 3
parentC
child1
child2
child 3
how can i modify my class and html?
my exp:
https://stackblitz.com/edit/angular-xem199
Reply
Answers (
3
)
How to Disabled Collapse and Expand details tag in angular 5
check date should not exceed to current date using javascri