mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
13 lines
276 B
TypeScript
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;
|
|
}
|