Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 39x 39x 39x | import { Injector } from '@angular/core';
import { OAuthService, OAuthStorage } from 'angular-oauth2-oidc';
export class InstanceCreators {
static getOAuthServiceInstance(parent: Injector, storageFactory?: () => OAuthStorage): OAuthService {
const injector = Injector.create({
providers: [
...(storageFactory ? [{ provide: OAuthStorage, useFactory: storageFactory }] : []),
{ provide: OAuthService },
],
parent,
});
return injector.get(OAuthService);
}
}
|