2016-10-13 2 views
0

각도가 2.0.1 인 TabView, NativeScript 2.3.0을 구현하고 싶습니다. 이 공식 가이드 here을 따르지만 아래 문제가 있습니다.NativeScript 탭보기 속성 바인딩 tabItem 오류

<TabView #tabview> 
     [ERROR ->]<StackLayout *tabItem="{title: 'Profile'}" > 
      <ListView [items]='items'> 
      <template let-i"): [email protected]:4 
    Property binding tabItem not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "directives" section. (" 
      </ListView> 
     </StackLayout> 
     [ERROR ->]<StackLayout *tabItem="{title: 'Stats'}"> 
      <Label text="Second tab item"></Label> 
     </StackLay"): [email protected]:4 
    Property binding tabItem not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "directives" section. (" 
      <Label text="Second tab item"></Label> 
     </StackLayout> 
     [ERROR ->]<StackLayout *tabItem="{title: 'Settings'}"> 
      <Label text="Third tab item"></Label> 

내가 컴파일러에서 가져온 오류가 나는 nativescript 지침의 모든 생각

Property binding tabItem not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "directives" section. 

은 기본적 전으로 포함되어 있습니다 : *tabItem 특별한 지시 등 Button, TextField이라고 수동으로 가져올 필요가 있습니까?

그건 그렇고, 정말로하고 싶은 것은 페이스 북의 모바일 앱 도크와 마찬가지로 몇 개의 탭이있는 Dock과 같이 휴대 전화 하단에 TabView 스틱이있는 것입니다. 누군가 코드 스 니펫을 게시 할 수 있습니까?

+0

Android 및 iOS에 대한 도움말에서 예제를 테스트하는 동안 문제를 재현하지 못했습니다. 그것과 관련하여 TabView 구성 요소를 사용하는 코드를 공유 할 수 있다면 도움이 될 것입니다. 안드로이드에 대한이 시점에서, TabView wiil의 탭은 항상 최상위에 위치하며 그 위치는 변경 될 수 없습니다. 목적을 위해 SegmentedBar를 사용하고 레이아웃의 가시성을 수동으로 제어 할 수 있습니다. - https://github.com/NativeScript/nativescript-sdk-examples-ng/tree/master/app/segmented-bar/segmented-bar-views . –

답변

1

당신이 당신의 각도 @NgModuleNativeScriptModule을 가져 확인 :

import { NativeScriptModule } from 'nativescript-angular/platform'; 
... 
@NgModule({ 
    imports: [NativeScriptModule, ...] 
}) 

대답 후반이지만 다른 사람을 도움이되기를 바랍니다.