Вопрос

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