0
我試圖將fa fa-address-card-o
包含到NativeScript應用程序的Label中。可悲的是,他沒有解決它的圖標,但留下的標籤爲空。當我用
(fa fa-info
)嘗試它時,他可以解決它。這是編碼問題嗎?HTML標籤無法解析圖標「」
參考的圖標: https://www.w3schools.com/icons/icons_reference.asp
不工作代碼:
<Label class="fontawesome-icon sidebar-icon"
col="0"
row="7"
(tap)="open(loginPath)"
(touch)="open(loginPath)"
text=""></Label>
工作代碼:
<Label class="fontawesome-icon sidebar-icon"
col="0"
row="7"
(tap)="open(loginPath)"
(touch)="open(loginPath)"
text=""></Label>
你可以設置UTF8格式 –
我不知道ns也不反應,而是'text'屬性什麼都會分配給'textContent'屬性?如果是這樣,你的html實體將不會被轉換爲它應該是的utf8字符。您需要將此html實體設置爲元素的innerHTML。 – Kaiido
看起來你需要導入某些圖標才能夠使用它們{N},我會在下面發表一個答案 –