bougarfaoui / ng-socket-io

Socket.IO module for Angular
MIT License
254 stars 57 forks source link

Error of Unexpected value '[object Object]' imported by the module 'AppModule' #14

Open geoffreymwangian opened 7 years ago

geoffreymwangian commented 7 years ago
    import { SocketIoModule, SocketIoConfig } from 'ng-socket-io';

   const config: SocketIoConfig = { url: 'http://localhost:8988', options: {} };

   @NgModule({
       declarations: [
           AppComponent
       ],
       imports: [
          BrowserModule,
         SocketIoModule.forRoot(config) 
       ],

    })
       export class AppModule { }

Am now getting an error of Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation

In the latest release of angular2 only modules can be imported in the imports area , please fix this

karan83 commented 7 years ago

I am also getting same kind error after upgrade Angular to latest version. I was working fine before upgrade . screenshot from 2017-06-28 14-11-19 Any fix for this issue ?

UNADYNE commented 7 years ago

upgrade to ngx-socket-io