Uber API service

In this section, we are going to start working with the service layer that interfaces with the Uber API. We will be implementing the aforementioned endpoints inside the Ionic app.

Once the app has been scaffolded, navigate into the src folder and create a new folder named services. Inside the services folder, create a file named uber.service.ts. We will be writing all the Uber integration logic here.

Open the riderr project inside your favorite text editor and navigate to riderr/src/services/uber.service.ts. The first thing we are going to do is add the required imports. Add the following to the top of the uber.services.ts file:

import { Injectable } from '@angular/core'; import { LoadingController } from 'ionic-angular'; ...

Get Learning Ionic - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.