angular ui grid - How to bring a link or anchor tag in Json? -


an example populating angular ui grid json data , working fine

plnkr.co/edit/xbvc4094ciu6ogdzxzx7?p=preview 

however not sure how have download link or link external source in 1 of column in json.

example, download link <a href....>download link</a> 

in datatables, supports how provide same in angular ui grid via json data.

thanks.

use cell template celltemplate generate column hyperlink, , {{row.entity.link}} fetch link json property (link property name in sample json). sample below.

columndefs: [{         name: 'firstname'       }, {         name: 'lastname'       }, {         name: 'job'       }, {         name: 'hyperlink',         celltemplate: '<div>' +           '  <a href="{{row.entity.link}}">click me</a>' +           '</div>'       }], data: [{         "firstname": "sonny",         "lastname": "jayet",         "job": "stack overflow user",         "link": "https://www.google.com"       }, {         "firstname": "tim",         "lastname": "harker",         "job": "stack overflow user",         "link": "https://stackoverflow.com"       }] 

i hope looking for, , solves problem.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -