diff --git a/dashboard/src/app/album/album.component.ts b/dashboard/src/app/album/album.component.ts index 44baef1..029e8eb 100644 --- a/dashboard/src/app/album/album.component.ts +++ b/dashboard/src/app/album/album.component.ts @@ -1,10 +1,11 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Params } from '@angular/router'; import { Location } from '@angular/common'; import { ElsService } from './../els.service'; import { Song } from './../object/song'; import { Album } from './../object/album'; +import { SongTableComponent } from '../song-table/song-table.component'; @Component({ selector: 'app-album', @@ -13,9 +14,13 @@ import { Album } from './../object/album'; }) export class AlbumComponent implements OnInit { + @ViewChild(SongTableComponent) private songtable: SongTableComponent; + albumName = ''; songs: Array = []; album: Album = new Album(); // If album not found, will be replaced by 'undefined' + + // Prevent useless data load + activate button in interface var moreDataAvailable = true; constructor( @@ -47,6 +52,7 @@ export class AlbumComponent implements OnInit { if (this.songs.length === 0) { this.songs = data; } else { + this.songtable.setSortable(true); data.forEach(song => { this.songs.push(song); }); diff --git a/dashboard/src/app/artist/artist.component.html b/dashboard/src/app/artist/artist.component.html index 1c6578b..eb60f1c 100644 --- a/dashboard/src/app/artist/artist.component.html +++ b/dashboard/src/app/artist/artist.component.html @@ -85,7 +85,7 @@ - +