Does Ionic 2 support side-by-side layout in landscape?


#1

I want to put a list with a detail panel to the right of it when in landscape mode. Can this be done, or would I need to implement it myself?


#2

Look what I managed to do!



#3

How did you managed this?


#4

@nwrman Stupid easy with CSS.

.side-content {
    display: none;

    &.landscape {
        display: initial;
    }
}
.landscape {
    width: 50%;
}

.landscape-right {
    left: 50%;
}

<ion-header [ngClass]="{'landscape': isLandscape}"></ion-header>
<ion-content class="side-content landscape-right" [ngClass]="{'landscape': isLandscape }">
    <p>Side B</p>
</ion-content>
<ion-content class="page-inbox page-content" [ngClass]="{'landscape': isLandscape }">
    <p>Side A</p>
</ion-content>
<ion-footer [ngClass]="{'landscape': isLandscape}"></ion-footer>


get isLandscape(): boolean {
    return this.platform.isLandscape();
}