Open helxsz opened 7 years ago
Hi, I reused part of your code from https://github.com/enaukkarinen/Angular2-RxJS-Socket.io-chat-application/blob/master/src/app/components/messaging/message.service.ts
` newMessage: Subject = new BehaviorSubject(null);
this.newMessage.next(new Message(JSON.parse(msg)));
` But I got one error saying
Supplied parameters do not match any signature of call target. and one error saying undefined object because of newMessage is null
any ideas how to solve it ?
You need an object Type ... it can be Message Object or anything you like ... like ( string, number, any ) newMessage: Subject<Message> = new BehaviorSubject<Message>(null);
Message
newMessage: Subject<Message> = new BehaviorSubject<Message>(null);
Hi, I reused part of your code from https://github.com/enaukkarinen/Angular2-RxJS-Socket.io-chat-application/blob/master/src/app/components/messaging/message.service.ts
` newMessage: Subject = new BehaviorSubject(null);
` But I got one error saying
any ideas how to solve it ?