diff --git a/dashboard/src/app/genre/genre.component.html b/dashboard/src/app/genre/genre.component.html index 525c4c0..3e7b3d5 100644 --- a/dashboard/src/app/genre/genre.component.html +++ b/dashboard/src/app/genre/genre.component.html @@ -1,28 +1,5 @@

{{genreName}}

- - - - - - - - - - - - - - - - - - - - - - - -
NameArtistAlbumAlbum ArtistPlay CountGenre
{{song['Track Number'] ? (("0" + song['Track Number']).slice(-2)) : "--"}}{{song.Name}}{{song.Artist}}{{song.Album}}{{song['Album Artist']}}{{song['Play Count']}}{{song.Genre}}
+
diff --git a/dashboard/src/app/genre/genre.component.ts b/dashboard/src/app/genre/genre.component.ts index 74f5d77..a2edece 100644 --- a/dashboard/src/app/genre/genre.component.ts +++ b/dashboard/src/app/genre/genre.component.ts @@ -1,7 +1,8 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Params } from '@angular/router'; import { ElsService } from '../els.service'; +import { SongTableComponent } from '../song-table/song-table.component'; import { Song } from '../object/song'; @@ -11,6 +12,7 @@ import { Song } from '../object/song'; styleUrls: ['./genre.component.css'] }) export class GenreComponent implements OnInit { + @ViewChild(SongTableComponent) songtable: SongTableComponent; genreName = ''; songs: Array = []; @@ -37,6 +39,7 @@ export class GenreComponent implements OnInit { this.songs = data; } else { data.forEach(song => { + this.songtable.setSortable(true); this.songs.push(song); }); }