Is showWhen broken?

I don’t know why showWhen="ios" and showWhen="android" is always evaluated to false although there is class="ios" in the html body.

HTML

<ion-buttons start>
  <button (click)="dismissLoginModal()">
    <span primary showWhen="ios">Cancel</span>
    <ion-icon name="close" showWhen="android"></ion-icon>
  </button>
</ion-buttons>

DOM

<ion-buttons start>
    <button class="bar-button bar-button-default bar-button-icon-right">
      <span primary showwhen="ios" hidden>Cancel</span>
      <ion-icon name="close" role="img" showwhen="android" class="ion-ios-close" aria-label="close" hidden></ion-icon>
    </button>
</ion-buttons>
1 Like

So unless I add ionicplatform=ios to the browser url, platform.is('ios') returns false. So even though the theme is iOS but it doesn’t imply the platform to be iOS. Is my understanding correct? It’s kind of confusing.

By default, when you view your app in the browser, Ionic will apply the iOS theme.