I am having issue with select tag and angular2.
I have the following code:
<select id="user" required
ngControl="user">
<option value="" disabled selected>PM</option>
<option *ngFor="#user of users" [value]="user">{{user.username}}</option>
</select>
where:
this.users = [{username: "example", id: 1},{username: "example2", id: 2}]
Which should assign to the control user
choosen object user from users. However, when I add
(event)="log()"
where log(){console.log(this.userForm.controls.user.value)
which gives me:
[object Object]
instead of:
{username: "example",id:1}
Any ideas?