FarmMapsLib/projects/common/src/fm/components/thumbnail/thumbnail.component.ts

22 lines
662 B
TypeScript

import { Component,Input } from '@angular/core';
import { Store } from '@ngrx/store';
import { IItem } from '../../models/item';
import { commonReducers,ItemTypeService } from '../../../public-api'
@Component({
selector: 'fm-thumbnail',
templateUrl: 'thumbnail.component.html',
styleUrls: ['thumbnail.component.scss']
})
export class ThumbnailComponent {
@Input() public item: IItem;
constructor(public store: Store<commonReducers.State>, public itemTypeService: ItemTypeService) {
}
getThumbnailUrl(item:IItem):string {
return item.url+'/thumbnail?v=' + Date.parse(item.updated);
}
}