Skip Navigation

InterstitialService

The interstitial service is used to show/hide the loading interstitial on the UI. Below is an image representing the current load interstitial:

load interstitial

Acquiring InterstitialService

In order to obtain InterstitialService and use you need to import it, e.g.

import {InterstitialService} from "sabre-ngv-app/app/services/impl/InterstitialService";

Then inside your source obtain the service as follows:

const interstitialService = getService(InterstitialService);

Available methods

There are two methods available in InterstitialService, currently they are:

showInterstitial
showInterstitial(timeout: number): void;

Shows interstitial that can be hidden manually or is automatically dismissed after provided timeout in milliseconds.

Type Parameteres:
timeout - interstitial timeout in milliseconds

hideInterstitial
hideInterstitial(): void;

Hides interstitial manually before the timeout runs out.

Example

You can see example usage in com.sabre.redapp.example3.web.customworkflow sample.