I'm fairly new to Angular 2, and I'm currently trying to populate a dropdown based on the selection from a different dropdown from mongoDB.
The Problem: I can load the rooms just fine, but whenever I try to load the items(channel) names, it messes up both dropdowns and just shows the first dropdown as empty and the dropdown 2 doesnt show up at all.
I've tried looking for other threads about this topic but they seem to be for Angular 1 instead of Angular 2. Can someone help me out?
Here's my code: app.component.html
<div class="row">
<div class="col-md-12">
<label>Choose a room</label>
<select [(ngModel)]="nodes">
<option *ngFor="let node of nodes"[ngValue]="node">{{node.name}}</option>
</select>
<br/><br/>
<label>Choose an item</label>
<div *ngFor="let module of node.modules">
<select [(ngModel)]="channels">
<option *ngFor="let channel of module.channels">
{{channel.name}}
</option>
</select>
</div>
</div>