How to use template in

后端 未结 1 1035
执念已碎
执念已碎 2021-02-15 17:45

I\'ve got a very basic question which I can\'t answer myself because most links to http://www.primefaces.org/primeng don\'t work anymore. I also tried registering to their forum

1条回答
  •  日久生厌
    2021-02-15 18:11

    Each p-column can have two templates - body and header, you should specify which one it is. It's not mandatory because body is default I think and this is what you need in this case, but it's good practice. You also need to add pTemplate to template in order for p-column to use it, this is the reason p-column won't display template you provided. So, your code should look like this:

    
      
      
        
            {{file.Status == 1 ? "Yes" : "No"}}
        
      
    
    

    0 讨论(0)
提交回复
热议问题