I am trying to get the selected value from a dropdown menu. I always get the error of missing ng-model.
I tried to pass the selected value in the ng-click but it didn't work.
Here's my dropdown menu
<ul class="dropdown-menu">
<li><a href="" ng-click="dropboxitemselected(xx)" >Cible</a></li>
<li><a href="" ng-click="marque()">Marque</a></li>
<li><a href="" ng-model="modele()">Modéle</a></li>
<li><a href="" ng-model="calculateur()">Calculateur</a></li>
</ul>
And here my controller
$scope.dropboxitemselected = function (x) {
alert(x);
}
I need the selected value as I am going to insert the value into an API then resend the data selected.