WIP Last added album

This commit is contained in:
2018-02-10 00:06:42 +01:00
parent b362ddf8c0
commit f0fce02e06
7 changed files with 49 additions and 2 deletions

View File

@@ -5,13 +5,15 @@ import { DashboardComponent } from './dashboard.component';
import { AlbumComponent } from './album/album.component';
import { ArtistComponent } from './artist/artist.component';
import { GenreComponent } from './genre/genre.component';
import { LastAddedComponent } from './last-added/last-added.component';
const routes: Routes = [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
{ path: 'album/:name', component: AlbumComponent },
{ path: 'artist/:name', component: ArtistComponent },
{ path: 'genre/:name', component: GenreComponent }
{ path: 'genre/:name', component: GenreComponent },
{ path: 'lastAdded', component: LastAddedComponent }
];
@NgModule({

View File

@@ -18,6 +18,8 @@ import { ConvertMoreExactPipe } from './convert-more-exact.pipe';
import { SortByPipe } from './sort-by.pipe';
import { ConvertSizeToStringPipe } from './convert-size-to-string.pipe';
import { LastAddedComponent } from './last-added/last-added.component';
@NgModule({
imports: [
BrowserModule,
@@ -31,6 +33,7 @@ import { ConvertSizeToStringPipe } from './convert-size-to-string.pipe';
ArtistComponent,
GenreComponent,
SongTableComponent,
LastAddedComponent,
ConvertMsPipe,
ConvertMoreExactPipe,
SortByPipe,

View File

@@ -78,7 +78,7 @@
</div>
<div class="col-md-12">
<h3>Last added albums</h3>
<h3><a [routerLink]="['/lastAdded']">Last Added</a></h3>
<table class="table table-striped">
<thead>

View File

@@ -0,0 +1,2 @@
<div class="container">
</div>

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LastAddedComponent } from './last-added.component';
describe('LastAddedComponent', () => {
let component: LastAddedComponent;
let fixture: ComponentFixture<LastAddedComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ LastAddedComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(LastAddedComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-last-added',
templateUrl: './last-added.component.html',
styleUrls: ['./last-added.component.css']
})
export class LastAddedComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}