fuse-angular/src/app/main/content/apps/chat/chat.component.ts
2017-08-14 17:09:00 +03:00

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;
});
}
}