Blame view

src/app/dashboard/texrshort.ts 364 Bytes
8672575a   DESKTOP-P23T5P2\NewTeryEiEi   แก้ไข api ใหม่
1
import { PipeTransform, Pipe } from "@angular/core";
16d48521   trainee   search ได้แค่อันเ...
2
3
4
5
6
7

@Pipe ({
    name: 'textshort'
})
export class TextShortPipe implements PipeTransform {
    transform(value: string): string {
8672575a   DESKTOP-P23T5P2\NewTeryEiEi   แก้ไข api ใหม่
8
        if(value === null){
16d48521   trainee   search ได้แค่อันเ...
9
10
            value = '';
        }
a8892711   trainee   เพิ่มแท็บใหม่และ ...
11
12
        if (value.length > 20) {
            return value.substr(0, 20) + ' ...';
16d48521   trainee   search ได้แค่อันเ...
13
14
15
        }
        return value;
    }
8672575a   DESKTOP-P23T5P2\NewTeryEiEi   แก้ไข api ใหม่
16
}