first draft
This commit is contained in:
24
src/app/services/phoenix-host-bridge.service.ts
Normal file
24
src/app/services/phoenix-host-bridge.service.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Injectable, Injector, signal } from '@angular/core';
|
||||
import type { IPluginServices } from '@phx/shared-ui';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class PhoenixHostBridgeService {
|
||||
private readonly _hostInjector = signal<Injector | null>(null);
|
||||
private readonly _pluginServices = signal<IPluginServices | null>(null);
|
||||
|
||||
hostInjector(): Injector | null {
|
||||
return this._hostInjector();
|
||||
}
|
||||
|
||||
setHostInjector(injector: Injector): void {
|
||||
this._hostInjector.set(injector);
|
||||
}
|
||||
|
||||
pluginServices(): IPluginServices | null {
|
||||
return this._pluginServices();
|
||||
}
|
||||
|
||||
setPluginServices(services: IPluginServices): void {
|
||||
this._pluginServices.set(services);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user