ConfigurationService

The ConfigurationService is an Angular service that handles Priority Web SDK configuration and login requirements.


Usage

import { ConfigurationService } from 'priority-ionic';

// use the ConfigurationService in any of your Services, Pages or Components
export class ...
{
    // inject it using Angular's Dependency injector
    constructor(private configService: ConfigurationService) {} 

    setConfig()
    {
        this.configService.config({
            url: 'https://your_domain.com',
            tabulaini: 'your_tabula.ini',
            language: 3,
            company: 'comapny',
            appname: 'MY_AWSOME_APP',
            devicename: ''
        });
    }

    login(username, password): Promise<any>
    {
        return this.configService.logIn(username, password);
    }
    ...
}


Instance Members


config(configuration: Configuration)

Call this method to set your configuration. Call it once for each session.


logIn(username: string ,password: string)

Call this method with the user’s credentials. Only call this after setting the configuration using the config() method.

You can store your user’s credentials using Ionic Storage, but this method must be called for each session.

Returns Promise - that indicates the login status.