N
const timer = createTimer(...);
timer.subscribe(...)
timer.pause(300)
Size: a a a
N
const timer = createTimer(...);
timer.subscribe(...)
timer.pause(300)
S
S
Y
S
YK
YK
@Pipe({
name: 'occupationLabel'
})
export class OccupationLabelPipe implements PipeTransform {
constructor(private i18nService: I18nService,
private occupationLabelRepository: OccupationLabelRepository) {
}
transform(bfsCode: string, ...args: any[]): Observable<string> {
return this.i18nService.currentLanguage$.pipe(
switchMap(lang => this.occupationLabelRepository.getOccupationLabelsByKey(OccupationTypes.BFS, bfsCode, lang)),
map( occLabelData => occLabelData.default)
);
}
}
ИК
YK
YK
YK
{{bfsCode | occupationLabel | async}}
- это просто кусок текста, можно его заключить в любые тэги, стилизовать как хочешь и прочееL
@Pipe({
name: 'occupationLabel'
})
export class OccupationLabelPipe implements PipeTransform {
constructor(private i18nService: I18nService,
private occupationLabelRepository: OccupationLabelRepository) {
}
transform(bfsCode: string, ...args: any[]): Observable<string> {
return this.i18nService.currentLanguage$.pipe(
switchMap(lang => this.occupationLabelRepository.getOccupationLabelsByKey(OccupationTypes.BFS, bfsCode, lang)),
map( occLabelData => occLabelData.default)
);
}
}
S
{{bfsCode | occupationLabel | async}}
- это просто кусок текста, можно его заключить в любые тэги, стилизовать как хочешь и прочееcode | map: label | async
S
Y
code | map: label | async
Y
S
S