1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/gallery/photo/photo.gallery.component.ts

27 lines
704 B
TypeScript
Raw Normal View History

2016-03-20 23:54:30 +08:00
///<reference path="../../../browser.d.ts"/>
import {Component, Input, ElementRef} from 'angular2/core';
2016-03-20 23:54:30 +08:00
import {Photo} from "../../../../common/entities/Photo";
2016-03-26 23:25:48 +08:00
import {Directory} from "../../../../common/entities/Directory";
import {Utils} from "../../../../common/Utils";
2016-03-20 23:54:30 +08:00
@Component({
selector: 'gallery-photo',
templateUrl: 'app/gallery/photo/photo.gallery.component.html'
})
export class GalleryPhotoComponent{
@Input() photo: Photo;
2016-03-26 23:25:48 +08:00
@Input() directory: Directory;
2016-03-20 23:54:30 +08:00
constructor(public elementRef: ElementRef) {
2016-03-20 23:54:30 +08:00
}
getPhotoPath(){
2016-03-30 03:46:44 +08:00
return Utils.concatUrls("/api/gallery",this.directory.path,this.directory.name,this.photo.name,"thumbnail");
2016-03-20 23:54:30 +08:00
}
2016-04-28 04:37:07 +08:00
2016-03-20 23:54:30 +08:00
}