We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3b42d4 commit 2ee3c04Copy full SHA for 2ee3c04
src/pages/chats/chats.ts
@@ -1,6 +1,7 @@
1
import { Component, OnInit } from '@angular/core';
2
import { Chats, Messages } from 'api/collections';
3
import { Chat } from 'api/models';
4
+import { NavController } from 'ionic-angular';
5
import { Observable } from 'rxjs';
6
7
@Component({
@@ -9,7 +10,7 @@ import { Observable } from 'rxjs';
9
10
export class ChatsPage implements OnInit {
11
chats;
12
- constructor() {
13
+ constructor(private navCtrl: NavController) {
14
}
15
16
ngOnInit() {
@@ -30,6 +31,10 @@ export class ChatsPage implements OnInit {
30
31
).zone();
32
33
34
+ showMessages(chat): void {
35
+ this.navCtrl.push(MessagesPage, {chat});
36
+ }
37
+
38
removeChat(chat: Chat): void {
39
Chats.remove({_id: chat._id}).subscribe(() => {
40
});
0 commit comments