Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Load external custom component with ion-segment

$
0
0

@Hanzo wrote:

Hi
It is possible to select a external custom-component depends on a click on ionic segment button?

Something like this:

<ion-header>
<ion-segment mode="md" [(ngModel)]="sections" color="primary">
      <ion-segment-button value="home">
        {{'Home.home' | translate}}
      </ion-segment-button>
      <ion-segment-button value="config">
        {{'Home.config' | translate}}
      </ion-segment-button>
   </ion-segment>
</ion-header>
<ion-content>
<div [ngSwitch]="sections">
      <custom-component *ngSwitchCase="'home'" [device]="currentDevice"></custom-component>
    </div>

</ion-content>

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>