I have this dropdownlist in my template:
<div class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
<div class="input-group input-group-sm">
<select class="form-control"
data-ng-options="o.name for o in list.itemsStatus"
data-ng-model="list.currentItemsStatus"
ng-change="list.getItems(o.id)">
</select>
</div>
</div>
Here is how is defined itemsStatus in controller:
this.itemsStatus = [{ name: "all", id: 1 }, { name: "new", id: 2 }, { name: "toUpdate", id: 3 }];
when new item is selected I fire this function:
function getItems(status) {
switch (status) {
case 1:
break;
case 2:
break;
case 3:
break;
default:
}
}
But passed parameter- status
is always undefined.
How can I pass to getItems() event the selected item as parameter?