2016-10-13 6 views
0

角型2.0.1、NativeScript 2.3.0のTabViewを実装したいと考えています。この公式ガイド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. 

がデフォルト、EXで含まれています: *tabItem特別指令等 ButtonTextFieldであること手動でインポートする必要がありますか?

ところで、私が本当にやりたいことは、Dockのようないくつかのタブを持つTabViewスティックを、Facebookのモバイルアプリドックとまったく同じように、携帯電話の下部に置くことです。誰かがコードスニペットを投稿できますか?

+0

AndroidとiOSの両方の記事の例をテストしているときに、問題を再現できませんでした。それについては、TabViewコンポーネントを使用しているコードを共有することができれば役に立ちます。 Androidのこの時点では、TabViewウィジェットのタブは常に一番上にあり、その位置は変更できません。目的のために、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, ...] 
}) 

回答が遅れているが、それは他の誰かを助けることを願っています。

関連する問題