Fix sort bug

This commit is contained in:
2017-05-06 14:47:44 +02:00
parent d099353aed
commit 8693c2ec7e
2 changed files with 2 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ const routes: Routes = [
{ path: 'dashboard', component: DashboardComponent },
{ path: 'detail/:id', component: HeroDetailComponent },
{ path: 'heroes', component: HeroesComponent },
{ path: 'album/:name', component: AlbumComponent }
{ path: 'album/:name', component: AlbumComponent },
{ path: 'artist/:name', component: ArtistComponent }
];

View File

@@ -5,7 +5,7 @@ import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: "sortBy"})
export class SortPipe implements PipeTransform {
transform(array: Array<string>, ...args: any[]): Array<string> {
transform(array: Array<any>, ...args: any[]): Array<any> {
array.sort((a: any, b: any) => {
for (let i = 0; i < array.length; i++) {
let arg = args[i];