mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-04-16 21:35:13 +00:00
27 lines
600 B
TypeScript
27 lines
600 B
TypeScript
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
|
import { ChatService } from './chat.service';
|
|
|
|
@Component({
|
|
selector : 'fuse-chat',
|
|
templateUrl : './chat.component.html',
|
|
styleUrls : ['./chat.component.scss'],
|
|
encapsulation: ViewEncapsulation.None
|
|
})
|
|
export class ChatComponent implements OnInit
|
|
{
|
|
selectedChat: any;
|
|
|
|
constructor(private chatService: ChatService)
|
|
{
|
|
}
|
|
|
|
ngOnInit()
|
|
{
|
|
this.chatService.onChatSelected
|
|
.subscribe(chatData => {
|
|
this.selectedChat = chatData;
|
|
});
|
|
}
|
|
|
|
}
|