Basisimplementierung Songlist

This commit is contained in:
2019-11-24 15:57:20 +01:00
committed by smuddy
parent 9897e66d50
commit 87aeb62a2a
57 changed files with 777 additions and 59 deletions

View File

@@ -0,0 +1,22 @@
import {Component, OnInit} from '@angular/core';
import {SongService} from "../services/song.service";
import {Song} from "../models/song";
@Component({
selector: 'app-songs',
templateUrl: './song-list.component.html',
styleUrls: ['./song-list.component.less']
})
export class SongListComponent implements OnInit {
public songs: Song[];
constructor(private songService: SongService) {
}
ngOnInit() {
this.songService.list().subscribe(songs => {
this.songs = songs.sort((a, b) => a.number - b.number);
});
}
}