Ionic

Start your Ionic project from an App Template

Introduction

In this section you learn how to get started with an Ionic template and get ready to use Back4App in 4 steps.

Prerequisites

To complete this quickstart, you need:

Step 1 - Get the template

  1. Download the template at our
    GitHub repository, and unzip files in your project folder. You can do that using the following command line:
      $ curl -LOk https://github.com/back4app/ionic-quickstart-example/archive/master.zip && unzip master.zip
    
  2. Navigate to the extracted folder and install the depedencies using the following command line:
    $ cd ionic-quickstart-example-master && npm install
    

Step 2 - Open the project template

  1. Open Visual Studio Code.
  2. Click on Open folder.

    Android Studio Welcome Screen

  3. Navigate to the project folder and click on OK.

    Android Studio Opening file

  4. Wait for Visual Studio to open.

Step 3 - Set up app’s credentials

Update your strings values to set up the app’s credentials. Parse Javascript SDK uses these settings to connect to the Back4App servers. In order to do that, follow these steps:

  1. Open your home typescript file: .../src/pages/home/home.ts

    Strings.xml File

  2. Go to your App Dashboard at Back4App Website.
  3. Navigate to app’s settings: Click on Server Settings > Core Settings block > SETTINGS.

    Back4app features page

  4. Return to your home.ts file and paste your App Id and JavaScript Key.

See more at our New Parse App guide.

Step 4 - Testing your connection

  1. Run your app on your browser.
$ ionic serve
  1. Wait until a new tab opens on your browser.

    Build app

    In order to see the page in a phone frame, press F12.

  2. Login at Back4App Website.
  3. Find your app and click on Dashboard.
  4. Click on Core.
  5. Go to Browser.

If everything works properly, you should find a class named Installation as follows:

Installation at Back4App Dashboard

It’s done!

At this point, you have learned how to get started with Ionic apps.