我正在尝试从 TabView 中的 tabItem 的组件(类实例)访问 ActionBar 中的 NavigationButton 和 SearchBar 的组件(类实例)。我该怎么做呢?
<ActionBar color="black" title="">
<NavigationButton #navBtn text="Go Back" android.systemIcon="ic_menu_back" (tap)="goBack()" [visibility]="navBtnVisibility"></NavigationButton>
<StackLayout *ngIf="tabIndex == 0" titleView orientation="horizontal">
<SearchBar hint="Search hint" [text]="searchPhrase" (textChange)="onTextChanged($event)" (submit)="onSubmit($event)"
color="black" textFieldHintColor="black"></SearchBar>
</StackLayout>
</ActionBar>
<TabView #tabView [selectedIndex]="tabIndex" (selectedIndexChanged)="tabViewIndexChange(tabView.selectedIndex)">
<StackLayout *tabItem="{title: 'Search'}" class="tab-item">
<search-tab>
</search-tab>
</StackLayout>
<StackLayout *tabItem="{title: 'Home'}" class="tab-item">
<home-tab>
</home-tab>
</StackLayout>
<StackLayout *tabItem="{title: 'Profile'}" class="tab-item">
<!--<profile></profile>-->
<profile-tab>
</profile-tab>
</StackLayout>
</TabView>