I am using angular to build a waitinglist-system, where you first join a waitinglist, and then can be moved to the memberlist. I use ng-repeat to fill inn the table with the rows of waiting people, and I assign a button to each row, which can be pressed to move that particular person to the memberlist.
First problem: I am not sure if i assign the value to the button in the correct way. It is supposed to be the email of the person.
<input type="submit" ng-click="makeMember()" ng-model="member" value="Member" id="{{person.email}}">
Second problem: I want to use this users email in order to make a sql query to send to the database to move the person to the memberlist (email is primary key).
I am trying to use $scope.member to reference the ng-model, but that only gives me an undefined value.
The makeMember function is just to see if it works (which it doesnt).
$scope.makeMember = function() {
alert("Person email: " + $scope.member);
};
Any help is highly appreciated!