1
0
study-lib-frontend/src/app/group/components/group-list/group-list.component.ts
2020-12-21 23:12:12 +01:00

29 lines
658 B
TypeScript

import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Group } from '../../interfaces/group.interface';
@Component({
selector: 'app-group-list',
templateUrl: './group-list.component.html',
styleUrls: ['./group-list.component.scss']
})
export class GroupListComponent implements OnInit {
@Input() groups: Group[];
@Output() joinRequest = new EventEmitter<number>();
@Output() show = new EventEmitter<number>();
constructor() { }
ngOnInit(): void {
}
onShow(groupId: number): void {
this.show.emit(groupId);
}
onJoinRequest(groupId: number): void {
this.joinRequest.emit(groupId);
}
}