Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Pipe, PipeTransform } from '@angular/core';
- @Pipe({
- name: 'condition',
- pure: false
- })
- export class ConditionPipe implements PipeTransform {
- transform(value: number): any {
- switch (value) {
- case 0: return 'Damaged';
- case 1: return 'Rough';
- case 2: return 'Average';
- case 3: return 'Clean';
- case 4: return 'Outstanding';
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement