2016-03-20 23:54:30 +08:00
|
|
|
///<reference path="../../../browser.d.ts"/>
|
|
|
|
|
|
|
|
import {Component, Input, OnInit} from 'angular2/core';
|
|
|
|
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() {
|
|
|
|
}
|
|
|
|
|
|
|
|
getPhotoPath(){
|
2016-03-26 23:25:48 +08:00
|
|
|
console.log(Utils.concatUrls("/api/gallery",this.directory.path,this.directory.name,this.photo.name));
|
|
|
|
return Utils.concatUrls("/api/gallery",this.directory.path,this.directory.name,this.photo.name);
|
2016-03-20 23:54:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|