I'm doing an application with angular 5 and Nativescript. Well, in the app I have different pages (components), and all of them have the same bottom menu that is a single component. My question is how can I pass a parameter to the menu component, because on the menu component I need know witch is the current page, for example for set a class active to the current page item of the menu.
One page example:
<Page>
<ActionBar title="" class="action-bar">
<StackPanel orientation="horitzontal">
<Label class="action-title" text="Canciones"></Label>
</StackPanel>
</ActionBar>
<StackLayout class="page">
<ListView [items]="filteredSongs" class="songs-listview" (itemTap)="songClick($event)" *ngIf="!isLoading">
<ng-template let-item="item">
<StackLayout>
<Label [text]='item.SON_NAME'></Label>
</StackLayout>
</ng-template>
</ListView>
<StackLayout verticalAlignment="center" *ngIf="isLoading" class="loading-stack">
<ActivityIndicator busy="{{ isLoading }}"></ActivityIndicator>
</StackLayout>
</StackLayout>
<main-menu></main-menu> // THE MENU COMPONENT