This commit is contained in:
tiago.kayaya
2021-03-17 09:06:42 +01:00
parent b667fad2a3
commit 41d9c2b5b6
6 changed files with 28 additions and 22 deletions
@@ -19,7 +19,7 @@ export class NewGroupPage implements OnInit {
//groupName:string;
@Input() groupName:string;
@Output() closeAllDesktopComponent = new EventEmitter<any>();
@Output() addGroupMessage:EventEmitter<any> = new EventEmitter<any>();
constructor(
private pickerController: PickerController,
@@ -42,7 +42,7 @@ export class NewGroupPage implements OnInit {
close(){
//this.modalController.dismiss();
console.log('close');
this.closeAllDesktopComponent.emit();
this.addGroupMessage.emit();
}
createGroup(){
@@ -51,7 +51,7 @@ export class NewGroupPage implements OnInit {
this.chatService.addGroup(body).subscribe(res=>{
console.log('group created');
console.log(res['group']);
this.closeAllDesktopComponent.emit(res['group']._id);
this.addGroupMessage.emit(res['group']._id);
});
}