Question

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).

Était-ce utile?

La solution

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;
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top