簡體   English   中英

Prime ng p-inplace 內容和顯示模板未顯示

[英]Prime ng p-inplace content and display templates are not showing

我正在使用 primeNg 的 p-inplace 並且我正在使用 primeg 版本14.1.2 但不幸的是,在 ng-template 中沒有顯示內容和顯示內容。 有人知道如何解決這個問題嗎?

我附上了 stackblitz url - https://stackblitz.com/edit/angular-r9l7kg?file=src/main.ts

我找到了解決方案,我們必須使用組件選擇器而不是ng-template 因為有兩個獨立的組件,一個用於顯示,另一個用於內容。 所以我把 HTML 改成了這樣的 -

<p-inplace>
   <span pInplaceDisplay> Click to Edit </span>
   <span pInplaceContent>
      <input type="text" [value]="rowData[col.field]" pInputText />
   </span>
</p-inplace>

暫無
暫無

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

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