Add fm-thumbnail component
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user