How to use the ngx-socket-io.SocketIoModule.forRoot function in ngx-socket-io

To help you get started, we’ve selected a few ngx-socket-io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github buraksenyurt / saturday-night-works / No 29 - Real Time App with Angular / authorApp / src / app / app.module.ts View on Github external
bildirimleri. Web Socket sunucusunun adresi de konfigurasyon bilgisi olarak tanımlanmakta.
*/
import { SocketIoModule, SocketIoConfig } from 'ngx-socket-io';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
const config: SocketIoConfig = { url: 'http://localhost:5004' };

@NgModule({
  declarations: [
    AppComponent,
    ArticleListComponent,
    ArticleComponent
  ],
  imports: [
    BrowserModule,
    // Üstte belirtilen url bilgisi ile birlikte socket modülünü hazır hale getirip içeri alıyoruz
    SocketIoModule.forRoot(config),
    BrowserAnimationsModule,
    FormsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
github quead / angular-youtube-player / src / app / components / settings / settings.component.spec.ts View on Github external
beforeEach(async(() => {
		TestBed.configureTestingModule({
			imports: [ReactiveFormsModule, FormsModule, SocketIoModule.forRoot(config)],
			declarations: [SettingsComponent],
			providers: [
				PlayerComponent,
				ButtonsComponent,
				PlaylistControlService,
				SharedService,
				GlobalsService,
				SessionManagerService,
				YoutubeGetVideo,
				HttpClient,
				HttpHandler
			]
		})
			.compileComponents();
	}));
github quead / angular-youtube-player / src / app / app.module.ts View on Github external
import { ModalComponent } from './components/modal/modal.component';
import { ModalService } from './services/modal.service';

const config: SocketIoConfig = { url: environment.serverURL, options: {} };

@NgModule({
	imports: [
		BrowserModule,
		HttpClientModule,
		ReactiveFormsModule,
		FormsModule,
		NguCarouselModule,
		AppRoutingModule,
		DragDropModule,
		SocketIoModule.forRoot(config)
	],
	declarations: [
		AppComponent,
		SettingsComponent,
		SearchComponent,
		AboutComponent,
		HistoryComponent,
		CategoryComponent,
		PlayerComponent,
		PlaylistComponent,
		RelatedComponent,
		RoomComponent,
		YoutubeIframeComponent,
		ButtonsComponent,
		VideoItemComponent,
		CategoryBadgeComponent,

ngx-socket-io

Socket.IO module for Angular

MIT
Latest version published 6 months ago

Package Health Score

70 / 100
Full package analysis