Last active
June 26, 2018 18:15
-
-
Save scottopolis/1909561873faaabadf20afb4891c18c2 to your computer and use it in GitHub Desktop.
AppPresser ion-segment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- add this code to a custom HTML page, change out your variables and lists --> | |
<ion-segment [(ngModel)]="event"> | |
<ion-segment-button value="schedule"> | |
Schedule | |
</ion-segment-button> | |
<ion-segment-button value="speakers"> | |
Speakers | |
</ion-segment-button> | |
<ion-segment-button value="sponsors"> | |
Sponsors | |
</ion-segment-button> | |
</ion-segment> | |
<!-- This is the default when the page is loaded --> | |
<div *ngIf="!event"> | |
<ap-list route="https://reactordev.com/apv3/wp-json/wp/v2/schedule?per_page=9"></ap-list> | |
</div> | |
<!-- these are the segments --> | |
<div [ngSwitch]="event"> | |
<div *ngSwitchCase="'schedule'"> | |
<ap-list route="https://reactordev.com/apv3/wp-json/wp/v2/schedule?per_page=9"></ap-list> | |
</div> | |
<div *ngSwitchCase="'speakers'"> | |
<ap-list route="https://reactordev.com/apv3/wp-json/wp/v2/speakers?per_page=9"></ap-list> | |
</div> | |
<div *ngSwitchCase="'sponsors'"> | |
<ap-list route="https://reactordev.com/apv3/wp-json/wp/v2/sponsors?per_page=9"></ap-list> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment