2016-07-11 6 views
1

私のnativescriptアプリケーションにフォントの素晴らしいアイコンを表示したいが、どこにも表示されないようにしたい。NativescriptフォントAwesome in FormattedSringボタン

<ScrollView row="0" orientation="vertical" ios.pagingEnabled="true"> 
    <StackLayout #container verticalAlignment="center"> 
     <Image src="res://logo_icon_white" stretch="none" horizontalAlignment="center"></Image> 
     <label [text]="'WELCOME' | translate" class="welcome-text" horizontalAlignment="center"></label> 

     <label text="&#xf230; " class="font-awesome" horizontalAlignment="center"></label> <--- WORKS! 

     <Button [text]="'LOGIN_WITH_PASWWORD' | translate" (tap)="tapped()"></Button> 
     <Button> 
      <FormattedString> 
       <Span text="&#xf230; " class="font-awesome"></Span> <--- DOESN'T WORK! 
       <Span text="&#xf230; " style="font-family: FontAwesome;"></Span> <--- DOESN'T WORK! 
       <Span [text]="'PROCEED_WITH_FACEBOOK' | translate" ></Span> 
      </FormattedString> 
     </Button> 
     <Button [text]="'CREATE_AN_ACCOUNT' | translate" class="account-button"></Button> 
    </StackLayout> 
</ScrollView> 

私はラベルにそれを使用する場合、それはアイコンが表示されますが、私は(私は翻訳を使用しているため)FormattedString /ボタンでそれを表示したいときには、アイコンが表示されません。

誰かが助けることを願っていますか?

答えて

0

Span要素は現在、CSSによるスタイリングをサポートしていません。スタイリングを設定するには、スパンのpropertiesを使用する必要があります。あなたの場合、次のように動作します:

<Span text="&#xf230;" fontFamily="FontAwesome"></Span> 
関連する問題