background-image.pipe.ts 211 Bytes
Newer Older
1 2 3 4 5 6 7
import {Pipe, PipeTransform} from '@angular/core';

@Pipe({
  name: 'backgroundImage'
})
export class BackgroundImagePipe implements PipeTransform {

liujiangnan's avatar
liujiangnan committed
8 9
  transform(value: any) {
    return `url(${value})`;
10 11 12
  }

}