Skip Navigation

EnvironmentPublicService

EnvironmentPublicService exposes a method to obtain environment details

Acquiring EnvironmentPublicService

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

import {EnvironmentPublicService} from 'sabre-ngv-app/app/services/impl/EnvironmentPublicService';

Then obtain the service inside your source as below:

const environmentPublicService: EnvironmentPublicService = getService(EnvironmentPublicService);

Available methods

Currently available methods:

getRuntime
getRuntime(): string;

Returns in what platform Sabre RedĀ RedApp is running on - desktop, web or mobile.

Example

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