문제

Given a simple ngTable (plnkr example); how do I link each row to api/foo/first column?

(so in that example, clicking first row would send webpage to /api/foo/Moroni)

If it's not possible with ngTable; I would be happy to accept an answer which uses any other AngularJS table directive (other than ngGrid).

도움이 되었습니까?

해결책

How about adding an ng-click into your row like this

ng-click="goto(user.name)"

And creating some function in your controller like this

var base_uri = "http://sacredgrove.com/";
$scope.goto = function(uri) {
  window.location = base_uri + uri;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top