2016-07-11 2 views
1

내 nativescript 응용 프로그램에 글꼴 멋진 아이콘을 표시하고 싶지만 그 글꼴이 어디에나 표시되지 않도록하고 싶습니다. 내가 레이블에서 사용하는 경우Nativescript Font 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>