mirror of https://github.com/ghostfolio/ghostfolio
4 changed files with 13 additions and 7 deletions
@ -1,11 +1,11 @@ |
|||||
import { Pipe, PipeTransform } from '@angular/core'; |
import { Pipe, PipeTransform } from '@angular/core'; |
||||
import { ghostfolioScraperApiSymbolPrefix } from '@ghostfolio/common/config'; |
import { prettifySymbol } from '@ghostfolio/common/helper'; |
||||
|
|
||||
@Pipe({ name: 'gfSymbol' }) |
@Pipe({ name: 'gfSymbol' }) |
||||
export class SymbolPipe implements PipeTransform { |
export class SymbolPipe implements PipeTransform { |
||||
public constructor() {} |
public constructor() {} |
||||
|
|
||||
public transform(aSymbol: string): string { |
public transform(aSymbol: string) { |
||||
return aSymbol?.replace(ghostfolioScraperApiSymbolPrefix, ''); |
return prettifySymbol(aSymbol); |
||||
} |
} |
||||
} |
} |
||||
|
Loading…
Reference in new issue