簡體   English   中英

如何給ng2智能表中的數據提供超鏈接

[英]how to give hyperlinks to data in ng2 smart table

在此處輸入圖像描述

這是我的 ng2-smart-table 但我想為 fullName 列的每個條目提供超鏈接。

在您的settings更改為此

  name: {
    title: 'name',
    type: 'html',
    editor: {
      type: 'custom',
      component: CustomEditorComponent,
    },
  },

然后在您的data中將name更改為這樣

name: '<a href="http://www.google.com">Google</a>',

然后復制這個文件https://github.com/akveo/ng2-smart-table/blob/master/projects/demo/src/app/pages/examples/custom-edit-view/custom-editor.component.ts到您的文件夾,然后在app.module.ts上聲明它

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM