Angular ngx-datatable multiple data in one column

前端 未结 2 2060
日久生厌
日久生厌 2021-01-12 11:56

I\'ve got a little problem adding more then one prop to column in ngx-datatable:

columns = [
  { prop: \'semesterName\', name: \'סמסטר\', resizeable: false }         


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 12:40

    Figured it out:

    To change column names - let-column
    Formatting cell content (ex: Date) - let-value
    Formatting with multiple properties Ex: Date - let-row

    The template:

    
            
                
                    סמסטר
                
                
                    {{row.semesterName}}
                
            
            
                
                    מפגש
                
                
                    {{row.event}} 
    {{row.eventName}}
    מועד מפגש {{row.where}}
    {{row.when}}
    מרצה {{row.lecturerName}} חוג {{row.hugName}}

    No need for [columns] anymore - remove it from the template.

提交回复
热议问题