Hey. i have a ng repeat table (Sunday is a table)
and i have a function that takes a worker ID and returns a worker name that called GetWorkerName How do i call the function in the ng repeat without clicking the function? pls help me :)
$scope.GetWorkerName=function(workerid){
$http.get("/ShiftWeb/rest/worker/getworkername?id="+workerid)
.then(function(response){
$scope.getWorkerName=response.data;
})
};
HTML:
--
<table class="table table-bordered table-striped">
<tr>
<th>Sunday</th>
</tr>
<tr ng-repeat="settingtime in settingtimes | orderBy:'time' |
filter:by_shiftDay" ng-if="settingtime.shiftDay=='SUNDAY'">
<td>
{{settingtime.time}}
</br>
<div style="border: 1px solid red" ng-repeat="sidor in nextsidor" ng-
if="sidor.shiftTime==settingtime.id">
Worker: {{sidor.worker}}
{{getWorkerName}}
</br>
Role : {{sidor.role}}
</br><button class="btn btn-primary" ui-sref="sidor" ng-
click="RemoveShift(sidor.id)">Remove Shift</button>
</div>
</br><button class="btn btn-primary" ui-sref="sidor" ng-
click="CreateShift(settingtime.id)">Create Shift</button>
</tr>
</table>