Ionic 2 Cookbook - Second Edition

Book description

Over 30 life-changing recipes to help you create cutting edge, hybrid apps with Ionic 2

About This Book

  • Leverage Ionic 2 and its exciting new features to create cutting edge real-time apps

  • Work through simple recipes to address your problems directly and solve them effectively

  • Get examples at each step to guide you on your learning curve

  • Who This Book Is For

    This book is for front end JavaScript developers who know the basics of JavaScript programming. No prior knowledge of Ionic is required to get the most of this book.

    What You Will Learn

  • Create custom UIs using Angular 2 directives

  • Make the best use of REST APIs to submit forms

  • Create beautiful animations and graphics in the application

  • Embed videos and other media into the app

  • Access native device functionalities such as a camera and maps using ngCordova

  • Theme the application based on the various platform styles available

  • Publish your application to a variety of platforms

  • Leverage Angular 2 events and Ionic-specific events to communicate

  • In Detail

    Developing real-time apps is the need of the hour, and apps that deal with humongous amounts of user data and real-time information that needs to be updated frequently are in high demand. Currently, one of the most popular frameworks for this task is Ionic Framework, which is undergoing a major makeover.

    This book will get you started with Ionic and help you create Angular 2 components that interact with templates. From there, you’ll work with Ionic components and find out how to share data efficiently between them. You’ll discover how to make the best use of the REST API to handle back-end services and then move on to animating the application to make it look pretty.

    You’ll learn to add in a local push notification in order to test the app. You’ll work with Cordova to support native functionalities on both iOS and Android. From there, you’ll get to grips with using the default themes for each platform as well as customizing your own. Finally, you’ll see how best to deploy your app to different platforms.

    This book will solve all your Ionic-related issues through dedicated recipes that will help you get the best out of Ionic.

    Style and approach

    This book is a recipe-based solution to all your Ionic 2 related problems and will help you create cutting edge real-time apps with ease through simple-to-understand step-by-step recipes.

    Table of contents

    1. Ionic 2 Cookbook Second Edition
      1. Table of Contents
      2. Ionic 2 Cookbook Second Edition
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. eBooks, discount offers, and more
          1. Why Subscribe?
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Sections
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Creating Our First App with Ionic 2
        1. Introduction
        2. Setting up a development environment
          1. Getting ready
          2. How to do it…
          3. There's More…
        3. Creating a HelloWorld app via the CLI
          1. How to do it…
          2. How it works…
        4. Creating a HelloWorld app via Ionic Creator
          1. Getting ready
          2. How to do it…
          3. There's More…
        5. Viewing the app using your web browser
          1. Getting ready
          2. How to do it…
          3. How it works…
        6. Viewing the app using the Ionic CLI
          1. Getting Ready
          2. How to do it…
        7. Viewing the app using Xcode for iOS
          1. How to do it…
          2. There's more…
        8. Viewing the app using Genymotion for Android
          1. How to do it…
        9. Viewing the app using Ionic View
          1. How to do it…
          2. There's more…
      9. 2. Adding Ionic 2 Components
        1. Introduction
        2. Adding multiple pages using tabs
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Adding left and right menu navigation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Navigating multiple pages with state parameters
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      10. 3. Extending Ionic 2 with Angular 2 Building Blocks
        1. Introduction
        2. Creating a custom pizza ordering component
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
        3. Creating a custom username input directive
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
        4. Creating a custom pipe
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
        5. Creating a shared service to provide data to multiple pages
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
      11. 4. Validating Forms and Making HTTP Requests
        1. Introduction
        2. Creating a complex form with input validation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Retrieving data via a mocked API using a static JSON file
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
        4. Integrating with Stripe for online payment
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
      12. 5. Adding Animation
        1. Introduction
        2. Embedding full screen inline video as background
          1. Getting ready
          2. How to do it...
          3. How it works…
        3. Creating a physics-based animation using Dynamics.js
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
        4. Animating the slide component by binding a gesture to the animation state
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
        5. Adding a background CSS animation to the login page
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. See also
      13. 6. User Authentication and Push Notification Using Ionic Cloud
        1. Introduction
        2. Registering and authenticating users using Ionic Cloud
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Building an iOS app to receive push notifications
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Building an Android app to receive push notifications
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      14. 7. Supporting Device Functionalities Using Ionic Native
        1. Introduction
        2. Taking a photo using the camera plugin
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
        3. Sharing content using the social sharing plugin
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Displaying a term of service using InAppBrowser
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
        5. Creating a Taxi app using the Google Maps plugin and geocode support
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
      15. 8. Theming the App
        1. Introduction
        2. Viewing and debugging themes for a specific platform
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        3. Customizing themes based on the platform
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
      16. 9. Publishing the App for Different Platforms
        1. Introduction
        2. Adding versioning to future proof the app
          1. Getting ready
          2. How to do it...
          3. How it works…
        3. Building and publishing an app for iOS
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Building and publishing an app for Android
          1. Getting ready
          2. How to do it…
          3. How it works…
      17. Index

    Product information

    • Title: Ionic 2 Cookbook - Second Edition
    • Author(s): Hoc Phan
    • Release date: November 2016
    • Publisher(s): Packt Publishing
    • ISBN: 9781786465962