0

私はそうのようなnativescriptにteleriks RadListViewのTKListViewHeaderDirectiveを使用しています:nativescript 'この' tkListViewHeader内部(RadListViewヘッダーディレクティブ)

<GridLayout columns="*" rows="*" tkToggleNavButton> 
    <RadListView *ngIf="!loading" row="3" col="0" [items]="nodes" ...> 
     <ng-template tkListItemTemplate let-node="item"> 
      <!-- list item --> 
     </ng-template> 
     <ng-template tkListViewHeader> 
      <GridLayout columns="*" rows="auto, auto, auto"> 
       <GridLayout row="0" col="0" columns="40,*,40"> 
        <Button class="fa action-item" row="0" col="0" [text]="'fa-sort-amount-asc' | fonticon" ios.position="right" android="actionBar" style="background-color:#c9c9ce;;"></Button> 
        <SearchBar row="0" col="1" #searchInput hint="Search" (submit)="search(searchInput.text)" (clear)="search('')" (textChange)="search(searchInput.text)"></SearchBar> 
        <Button class="fa action-item" row="0" col="2" [text]="'fa-th' | fonticon" ios.position="right" android="actionBar" style="background-color:#c9c9ce;"></Button> 
       </GridLayout> 
       <StackLayout row="1" col="0"> 
        <Label text="Hello world"></Label> 
        <Label [text]="currentNode.name"></Label> 
        <Label [text]="nodes?.length ? nodes.length : 0"></Label> 
       </StackLayout> 
       <StackLayout row="2" col="0" *ngIf="!nodes?.length" class="list-group"> 
        <!-- some contents --> 
       </StackLayout> 
       <StackLayout row="3" col="0" *ngIf="currentNode?.name !== '/'" class="list-group"> 
        <!-- some contents --> 
       </StackLayout> 
      </GridLayout> 
     </ng-template> 
    </RadListView> 
</GridLayout> 

それは二つのことのように思えるが間違ってここに行く:

  1. thisがここにないようです(* ngIfは特定のケースでStackLayoutsの1つを表示する必要がありますが、そうではありません)
  2. GridLayoutはStackLayoutに変更しても効果がありません。 OWSのみのドキュメントによると1子要素

http://docs.telerik.com/devtools/nativescript-ui/Controls/Angular/ListView/header-footerこの関わるgithubの上の問題があり

答えて

関連する問題