### File

`projects/app-base-library/src/lib/angular/services/resolvers.service.ts`

### Index

###### Methods

- resolve

### Constructor

`constructor(config: ConfigService)`
Defined in projects/app-base-library/src/lib/angular/services/resolvers.service.ts:6

Parameters :

Name | Type | Optional
config | `ConfigService` | no

### Methods

resolve
`resolve()`
Defined in projects/app-base-library/src/lib/angular/services/resolvers.service.ts:10
Returns : `any`

    import { Resolve } from '@angular/router';
    import { Injectable } from '@angular/core';
    import { ConfigService } from './config.service';

    @Injectable()
    export class CredentialsResolver implements Resolve<any> {

        constructor(private config: ConfigService ) { }

        resolve() {
            return new Promise(resolve => {
                if(this.config.get('credentials')) {
                    resolve(this.config.get('credentials'));
                } else {
                    resolve({});
                }
            });
        }

    }

# results matching ""

# No results matching ""