0

I'd like to get an object when the user select a value in the select. I'm using the ng-change to call a function

<select ng-model="study.dayIntermediate"
        ng-change="addDay(day)"
        ng-options="day as day.libelle for day in listOfDays | orderBy : 'duration'">
</select>

An example of my object :

{
    libelle: "question",
    duration: 15
}

My function :

$scope.addDay = function(day) {
    console.log(day);
}

But I get the value undefined.

Does anybody have an idea of what I'm doing wrong please ?

0 Answers0