Permalink
Browse files

Step 6.1: Add showMessages

  • Loading branch information...
dotansimha authored and darkbasic committed Jan 24, 2017
1 parent 793b520 commit d21f5018827d43d68ab0969df9885717ce6b2802
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/pages/chats/chats.ts
View
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { Chats, Messages } from 'api/collections';
import { Chat } from 'api/models';
import { NavController } from 'ionic-angular';
import { Observable } from 'rxjs';
@Component({
@@ -9,7 +10,7 @@ import { Observable } from 'rxjs';
export class ChatsPage implements OnInit {
chats;
constructor() {
constructor(private navCtrl: NavController) {
}
ngOnInit() {
@@ -30,6 +31,10 @@ export class ChatsPage implements OnInit {
).zone();
}
showMessages(chat): void {
this.navCtrl.push(MessagesPage, {chat});
}
removeChat(chat: Chat): void {
Chats.remove({_id: chat._id}).subscribe(() => {
});

0 comments on commit d21f501

Please sign in to comment.