Domanda

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

È stato utile?

Soluzione

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;
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top