mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
implementing directory rendering
This commit is contained in:
parent
295d728e51
commit
23885f2699
0
demo/images/emptydirectory/.placeholder
Normal file
0
demo/images/emptydirectory/.placeholder
Normal file
@ -0,0 +1 @@
|
||||
<span>{{directory.name}}</span>
|
@ -0,0 +1,19 @@
|
||||
///<reference path="../../../browser.d.ts"/>
|
||||
|
||||
import {Component, Input, OnInit} from 'angular2/core';
|
||||
import {Directory} from "../../../../common/entities/Directory";
|
||||
|
||||
@Component({
|
||||
selector: 'gallery-directory',
|
||||
templateUrl: 'app/gallery/directory/directory.gallery.component.html'
|
||||
})
|
||||
export class GalleryDirectoryComponent{
|
||||
@Input() directory: Directory;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
<h1>Gallery</h1>
|
||||
<div *ngIf="directory" *ngFor="#photo of directory.photos" >
|
||||
<gallery-photo *ngIf="photo" [photo]="photo" >a photo</gallery-photo>
|
||||
|
||||
<div *ngIf="directory" *ngFor="#directory of directory.directories" >
|
||||
<gallery-directory *ngIf="directory" [directory]="directory" ></gallery-directory>
|
||||
</div>
|
||||
<div *ngIf="directory" *ngFor="#photo of directory.photos" >
|
||||
<gallery-photo *ngIf="photo" [photo]="photo" ></gallery-photo>
|
||||
</div>
|
@ -7,11 +7,13 @@ import {GalleryService} from "./gallery.service";
|
||||
import {Directory} from "../../../common/entities/Directory";
|
||||
import {Message} from "../../../common/entities/Message";
|
||||
import {GalleryPhotoComponent} from "./photo/photo.gallery.component";
|
||||
import {GalleryDirectoryComponent} from "./directory/directory.gallery.component";
|
||||
|
||||
@Component({
|
||||
selector: 'gallery',
|
||||
templateUrl: 'app/gallery/gallery.component.html',
|
||||
directives:[GalleryPhotoComponent]
|
||||
directives:[GalleryPhotoComponent,
|
||||
GalleryDirectoryComponent]
|
||||
})
|
||||
export class GalleryComponent implements OnInit{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user