mirror of https://github.com/ghostfolio/ghostfolio
12 changed files with 42 additions and 10 deletions
@ -0,0 +1,11 @@ |
|||||
|
import { NgModule } from '@angular/core'; |
||||
|
|
||||
|
import { SymbolPipe } from './symbol.pipe'; |
||||
|
|
||||
|
@NgModule({ |
||||
|
imports: [], |
||||
|
declarations: [SymbolPipe], |
||||
|
exports: [SymbolPipe], |
||||
|
providers: [] |
||||
|
}) |
||||
|
export class GfSymbolModule {} |
@ -0,0 +1,11 @@ |
|||||
|
import { Pipe, PipeTransform } from '@angular/core'; |
||||
|
import { ghostfolioScraperApiSymbolPrefix } from '@ghostfolio/helper'; |
||||
|
|
||||
|
@Pipe({ name: 'gfSymbol' }) |
||||
|
export class SymbolPipe implements PipeTransform { |
||||
|
public constructor() {} |
||||
|
|
||||
|
public transform(aSymbol: string): string { |
||||
|
return aSymbol?.replace(ghostfolioScraperApiSymbolPrefix, ''); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue