Join egghead, unlock knowledge.

Want more egghead? It's 45% off for a limited time only!

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock All Content for 45% Off

Already subscribed? Sign In

Save 45% for a limited time.

Get access to all courses and lessons on egghead today.

Autoplay

    Preview an Angular 2 Mobile App with Ionic Lab

    Mike HartingtonMike Hartington

    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.

    angularAngular
    2 - 6
    ionicIonic
    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    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.

    Discuss

    Discuss