Have different views for smartphone and tablet


We would like to build one mobile app shared by smartphone and tablet (and desktop if possible).
Is there a way to include different views for different devices? I would not like to use ngIf for doing this because this has to many loaded and unused code.

the perfect thing would be have
and so on.

I know the team talked a long time ago about that and was interested to do this also for ionic1. How is the situation now for that? Also it would be nice to can bundle for --smartphone which does not bundle my.tablet.html in the smartphone tablet.

Something like that would be great!

By the way: The new Split Panel you released today in ionic nightly looks great!! Good work guys!

Different views for mobile vs tablet?
Best way to handle views on pwa

I think I have found a solution or let us call it a workaround for this problem, there is an angular lib which has different directives, have a look at

It seems to work great

We use for example something like that

<ion-row *showItBootstrap="['xs', 'sm']">
<ion-row *showItBootstrap="['md', 'lg', 'xl']">

With this lib you can add several checks for different screen sizes or devices or browser or many others.

Another big advantage I figured out, showWhen and hideWhen only add display: none to element, but in fact the component is still there. I think this lib is more then an *ngIf, so it is not rendered and so not in the DOM present!
This could be a very big advantage.

It would be very very nice to see something like that in ionic in feature!

Different views for mobile vs tablet?