11 lines
335 B
TypeScript
11 lines
335 B
TypeScript
import {Pipe, PipeTransform} from "@angular/core";
|
|
import {DomSanitizer, SafeUrl} from "@angular/platform-browser";
|
|
import {StringUtils} from "../string-utils.class";
|
|
|
|
@Pipe({name: 'urlPrefix'})
|
|
export class UrlPrefixPipe implements PipeTransform {
|
|
transform(value): SafeUrl {
|
|
return StringUtils.urlPrefix(value) + value;
|
|
}
|
|
}
|