docs: remove unused StringSafeDatePipe from AngularJS Quick Ref example (#28592)
PR Close #28592
This commit is contained in:
parent
d29f781685
commit
19f13b1ad4
|
@ -1,14 +0,0 @@
|
|||
import { Injectable, Pipe, PipeTransform } from '@angular/core';
|
||||
import { DatePipe } from '@angular/common';
|
||||
|
||||
@Injectable()
|
||||
// #docregion date-pipe
|
||||
@Pipe({name: 'date', pure: true})
|
||||
export class StringSafeDatePipe extends DatePipe implements PipeTransform {
|
||||
transform(value: any, format: string): string {
|
||||
value = typeof value === 'string' ?
|
||||
Date.parse(value) : value;
|
||||
return super.transform(value, format);
|
||||
}
|
||||
}
|
||||
// #enddocregion date-pipe
|
Loading…
Reference in New Issue