function tableController() {
var trArray = []; // [{id: 1, ...}, {id: 2, ...}, ...];
this.getTrArray = function() { return trArray; }
this.openWindow = openWindow;
function openWindow(tr) {
jsUtils.openWindow('/element_search.php?lang=ru&id=' + tr.id + '&n=news[n0]', 600, 500);
}
}
<tr ng-repeat="tr in tableCtrl.getTrArray() track by $index">
<td>...</td>
<td><button type="button" class="adm-btn" ng-click="tableCtrl.openWindow(tr)">Выбрать</button></td>
</tr>
.when('/workpeople/show/id/{workerId:\d+}', {
...
crmApp.controller('CrmWorkPeopleShowController', ['$scope', '$http', '$routeParams', function($scope, $http, $routeParams){
$scope.watispage = 'Сотрудник';
$http.get('api/ShowWorkpeople/' + $routeParams.id).then(
function(result){
$scope.workpeople = result.data;
}
)
}]);