I have some kind of repeat (its actually the grid-api that loops among elements). For each row I print a checkbox. In grid-api the element is referred as row.entity. Which is a json object.
Now, Im setting the ng-model equals to the id, like this:
ng-model="row.entity.id"
I also print that ID on the screen, and it is a number. The ng-click looks like this:
ng-click="grid.appScope.addToQueue(row.entity.id, $event)"
The function that handles the ng-click is this:
scope.addToQueue = function(id, $event){
var element = angular.element($event.target);
console.log("element:",element);
console.log("id:",id);
}
The problem is that on the screen a number is printed. But as soon as I click in the checkbox, the value becomes a boolean, true or false.
How can I get the actual number?
In the console it is the same problem. The boolean is printed.