Skip to content

Commit

Permalink
Step 4.1: Added showMessage method
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and DAB0mB committed Feb 26, 2017
1 parent d685865 commit df404a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/imports/pages/chats/chats.component.ts
Expand Up @@ -7,6 +7,7 @@ import style from "./chats.component.scss";
import {Chats} from "../../../../both/collections/chats.collection";
import {Message} from "../../../../both/models/message.model";
import {Messages} from "../../../../both/collections/messages.collection";
import {NavController} from "ionic-angular";

@Component({
selector: "chats",
Expand All @@ -18,7 +19,7 @@ import {Messages} from "../../../../both/collections/messages.collection";
export class ChatsComponent implements OnInit {
chats: Observable<Chat[]>;

constructor() {
constructor(private navCtrl: NavController) {

}

Expand All @@ -40,4 +41,8 @@ export class ChatsComponent implements OnInit {
)
).zone();
}

showMessages(chat): void {
this.navCtrl.push(MessagesPage, {chat});
}
}

0 comments on commit df404a5

Please sign in to comment.