Permalink
Browse files

Step 7.36: Added showOptions method

  • Loading branch information...
dotansimha authored and darkbasic committed Jan 24, 2017
1 parent 81270f5 commit 6ddddf954c7163cd53c070121f0d36837ab1642b
Showing with 13 additions and 2 deletions.
  1. +13 −2 src/pages/chats/chats.ts
@@ -1,17 +1,20 @@
import { Component, OnInit } from '@angular/core';
import { Chats, Messages } from 'api/collections';
import { Chat } from 'api/models';
import { NavController } from 'ionic-angular';
import { NavController, PopoverController } from 'ionic-angular';
import { Observable } from 'rxjs';
import { MessagesPage } from '../messages/messages';
import { ChatsOptionsComponent } from './chats-options';
@Component({
templateUrl: 'chats.html'
})
export class ChatsPage implements OnInit {
chats;
constructor(private navCtrl: NavController) {
constructor(
private navCtrl: NavController,
private popoverCtrl: PopoverController) {
}
ngOnInit() {
@@ -40,4 +43,12 @@ export class ChatsPage implements OnInit {
Chats.remove({_id: chat._id}).subscribe(() => {
});
}
showOptions(): void {
const popover = this.popoverCtrl.create(ChatsOptionsComponent, {}, {
cssClass: 'options-popover chats-options-popover'
});
popover.present();
}
}

0 comments on commit 6ddddf9

Please sign in to comment.