Home > Back-end >  Angular generic-ui set custom href link in cell
Angular generic-ui set custom href link in cell

Time:12-12

I am using enter image description here

CodePudding user response:

You can use custom HTML to achieve that.

https://stackblitz.com/edit/angular-grid-quick-start-mi6byv?file=src/string-food/string-food.component.ts

https://github.com/generic-ui/generic-ui/issues/11

......
    {
      header: 'GuiCellView.LINK',
      field: 'wiki',
      type: GuiDataType.STRING,
      view: (value: string, obj: any) => {
        return `<a href="${value}" target="_blank">${obj.name}</a>`;
      },
    },
......
  • Related