initial commit

This commit is contained in:
2021-10-03 17:40:30 +02:00
commit 4db665a4c0
97 changed files with 19365 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { Component, OnInit, Input } from '@angular/core';
import { VoteService } from '../../services/vote.service';
@Component({
selector: 'ui-entry',
templateUrl: './entry.ui.html',
styleUrls: [ './entry.ui.scss' ]
})
export class UiEntry implements OnInit {
@Input() entry: any;
@Input() index : number;
@Input() change : Function;
constructor(private voteService: VoteService) { }
ngOnInit(): void {
}
voteUp() {
this.voteService.voteEntryUp(this.entry.id).subscribe((result) => {
this.change && this.change()
});
}
voteDown() {
this.voteService.voteEntryDown(this.entry.id).subscribe((result) => {
this.change && this.change()
});
}
}