The mode attribute on Ionic4 web element is not working when routed from another page

The mode attribute helps select the style we want to use on our platform. We can choose between md and ios. It was ok till ionic3. Now, it is ok only on the landing page. But, if it is routed, that is availed after navigation, it loses all its style. Here is my code.

<ion-segment mode="ios" [(ngModel)]="news_announce" color="primary" (ionChangeIos)="newsAnnounce($event)">
          <ion-segment-button value="news">
          <ion-segment-button value="announce">

The above code shows ios style regardless of the platform it is on, but only on homepage/landing-page. If kept on another page, it is showing like list.


It should be looking like the below, which is showing in homepage.