how can we use socket.io with Angular.? : this is my code.


import { Component } from '@angular/core';

import { createServer, Server } from 'http';

import * as express from 'express';

import * as socketIo from 'socket.io';





const SERVER_URL = 'localhost:4200';

@Component({




  selector: 'app-root',

  templateUrl: './app.component.html',

  styleUrls: ['./app.component.css']

})

export class AppComponent {

   
  public static readonly PORT:number = 8080;

  private app: express.Application;

  private server: Server;

  **"private io: SocketIO.server;"**  ////at this line i get error that cannot find namespace SocketIO

  private port: string | number;
  

}



i am trying to use socket.io in my angular app. and i get the error in at the bold line.can any one help me that why i am getting this error.

