How to use a callback function on angucomplete-alt selected-object attribute?
I digged the example from: Angucomplete Alt and I find out that you must provide the selected-object
like this, even if It's a callback function:
<angucomplete-alt id="skill1"
selected-object="addSkill"
remote-url="@Url.Action("GetSkills", "ManageMission")/?query="
title-field="Name"
minlength="1"
match-class="angucomplete-match"
input-class="form-control"
template-url="@Url.Content("~/Templates/angucomplete-alt.html")"></angucomplete-alt>
And the callback method should receive the selected
item as parameter:
$scope.addSkill = function (selected) {
console.log(selected);
};