⚠️ This lesson is retired and might contain outdated information.

Preview an Angular 2 Mobile App with Ionic Lab

Mike Hartington
InstructorMike Hartington
Share this video with your friends

Social Share Links

Send Tweet
Published 8 years ago
Updated 9 months ago

Ionic’s CSS and JS can detect what platform a user is on, and adjust to make sure you’re getting the correct interface. To preview this locally, you can use the CLI’s --lab flag to see what your app will look like before it’s even deployed to a device.

[00:00] When running in the browser, Ionic defaults to a very material design look and feel. This isn't the only UI mode that Ionic has. To view Ionic's different UI modes, we can use the Ionic Lab command to simulate different platforms.

[00:16] We'll open up a new terminal, and run the command "Ionic Lab." This will start up our live reload server, but instead of loading our app, will give a custom page with our app in a device preview. We can load additional platforms by going up to the platforms tab and selecting either Andriod, iOS, or even Windows.

[00:39] The differences become more apparent when you look at an app's navigation. When you view Android, the page transitions feel very material design, right at home on the Android platform. For iOS, the pages move left to right, and vice versa when going back, right at home with the iOS design pattern.

[00:59] We can see the platform differences extend to UI components as well. Let's modify our sliding items option buttons a bit. We'll notice that the icons will adapt to each of the platforms, making the whole experience of the app that much better.

[01:21] These platform differences exist for every component inside Ionic's toolkit. Be sure to check out the documentation, so that way you can see a clear example of all the components and all their different modes.