0

Using Angular 5 and AG GRID, how do I make cells have HREF? Im using the example provided here: ag-Grid Reference: Getting Started with Angular

For example, I would like the 'Make' column to have an href to an edit page. It looks like the key is utilizing cell renderers.

ShellNinja
  • 629
  • 8
  • 25
Judy007
  • 5,484
  • 4
  • 46
  • 68
  • https://plnkr.co/edit/AcfU8spNR4C5gwWu4vtw Pay attention to dynamic.component.ts and how the module imports ` AgGridModule.withComponents(...)` – bc1105 May 31 '18 at 17:58
  • @bc1105, providng me a link to what was already in the ag grid docs doesnt help. Whats needed is a clear example of just a single column with an href, which is not what you provided. – Judy007 Jun 01 '18 at 03:33

1 Answers1

1

I created a plunkr with only the link cell renderer component: https://plnkr.co/edit/AcfU8spNR4C5gwWu4vtw

Check out the LinkComponent and how its imported an used in DynamicComponent.

Though it's a simple component in which you may think a function will suffice, I recommend using separate components for every cell renderer as you never know if you will need to scale out.

bc1105
  • 1,270
  • 8
  • 8