Am importing socket io module as described Here on ng-socket github page but getting an error of
Unexpected value '[object Object]' imported by the module
'AppModule'. Please add a @NgModule annotation
THis is what i have done:
import { SocketIoModule, SocketIoConfig } from 'ng-socket-io';
const config: SocketIoConfig = { url: 'http://localhost:8988', options: {} };
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
SocketIoModule.forRoot(config)
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
What else do i need to add, If anybody has implemented a socket io successifull with angular2 you can also advice on other better packages