© Fu Cheng 2017

Fu Cheng, Build Mobile Apps with Ionic 2 and Firebase, 10.1007/978-1-4842-2737-4_9

9. Share Stories

Fu Cheng

(1)Sandringham, Auckland, New Zealand

Now we move to the last user story on the list that allows users to share stories.

Card Layout

To allow users to share stories, we need to add a new button. If we add this button to the current UI, then all these UI components cannot fit into one line. We need a new layout for all those components. A good choice is the card layout.

Cards are created using the component ion-card. A card can have a header and content that can be created using ion-card-header and ion-card-content, respectively. Listing 9-1 shows a simple card with a header and content.

Listing 9-1. A simple card
<ion-card> ...

Get Build Mobile Apps with Ionic 2 and Firebase: Hybrid Mobile App Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.