Blame view

src/app/dashboard/short.ts 346 Bytes
8672575a   DESKTOP-P23T5P2\NewTeryEiEi   แก้ไข api ใหม่
1
import { PipeTransform, Pipe } from "@angular/core";
1ba832b3   trainee   ยิง api ทุก 10 นา...
2
3
4
5
6
7

@Pipe ({
    name: 'short'
})
export class ShortPipe implements PipeTransform {
    transform(value: string): string {
8672575a   DESKTOP-P23T5P2\NewTeryEiEi   แก้ไข api ใหม่
8
        if(value === null){
8703c523   trainee   แก้ เสริชแล้วลบ ข...
9
10
            value = '';
        }
a1964257   trainee   เปลี่ยนคอมเม้น
11
        if (value.length > 19) {
8672575a   DESKTOP-P23T5P2\NewTeryEiEi   แก้ไข api ใหม่
12
            return value.substr(0, 19)
2db09f73   trainee   แก้บัคคอมเม้น
13
14
        }
        return value;
1ba832b3   trainee   ยิง api ทุก 10 นา...
15
    }
8672575a   DESKTOP-P23T5P2\NewTeryEiEi   แก้ไข api ใหม่
16
}