dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_WebsocketModule cluster_WebsocketModule_providers WebsocketService WebsocketService WebsocketModule WebsocketModule WebsocketService->WebsocketModule

File

src/app/component/websocket/websocket.module.ts

Providers

Methods

Static config
config(wsConfig: WebSocketConfig)
Parameters :
Name Type Optional
wsConfig WebSocketConfig No
/**
 * @license
 * Copyright Stbui All Rights Reserved.
 * https://github.com/stbui
 */

import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { WebsocketService } from './websocket.service';
import { config } from './websocket.config';
import { WebSocketConfig } from './websocket.interface';

@NgModule({
  imports: [CommonModule],
  declarations: [],
  providers: [WebsocketService]
})
export class WebsocketModule {
  public static config(wsConfig: WebSocketConfig): ModuleWithProviders {
    return {
      ngModule: WebsocketModule,
      providers: [{ provide: config, useValue: wsConfig }]
    };
  }
}

result-matching ""

    No results matching ""