Files
pixel.horse/src/ts/components/shared/directives/revSrc.ts
T
2019-08-28 21:15:02 -07:00

13 lines
276 B
TypeScript

import { Directive, Input, HostBinding } from '@angular/core';
import { getUrl } from '../../../client/rev';
@Directive({
selector: '[revSrc]',
})
export class RevSrc {
@HostBinding() get src() {
return this.revSrc && getUrl(this.revSrc);
}
@Input() revSrc?: string;
}