-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchat.page.ts
34 lines (27 loc) · 848 Bytes
/
chat.page.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { Component, OnInit } from '@angular/core';
import { NavParams, ModalController, Events } from '@ionic/angular';
import { ChatroomPage } from '../chatroom/chatroom.page';
@Component({
selector: 'app-chat',
templateUrl: './chat.page.html',
styleUrls: ['./chat.page.scss'],
})
export class ChatPage implements OnInit {
chatsArray = [];
readOrNot = 'notRead';
constructor(private navParams: NavParams,
private modalCtrl: ModalController,
private event: Events) {
this.chatsArray = this.navParams.data.value;
console.log(this.chatsArray);
}
async read(index: number) {
const modal = await this.modalCtrl.create({
component: ChatroomPage,
componentProps: {login: this.chatsArray[index].LoginExp}
});
return await modal.present();
}
ngOnInit() {
}
}