Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Component, Input, Injector } from '@angular/core';
- import { DocumentUploadServiceProxy, OriginalBlobDto } from '@shared/service-proxies/service-proxies';
- import { AppComponentBase } from '@shared/common/app-component-base';
- @Component({
- selector: 'gallery',
- templateUrl: './gallery.component.html',
- styleUrls: ['./gallery.component.css'],
- })
- export class GalleryComponent extends AppComponentBase {
- @Input() dataCollection;
- selectedImage;
- constructor(injector: Injector, private documentUploadService: DocumentUploadServiceProxy) {
- super(injector);
- }
- setSelectedImage(image) {
- this.documentUploadService.getOriginalBlob('', image.blobFileName, '', image.docType).subscribe((result) => {
- this.selectedImage = result;
- });
- }
- navigate(forward) {
- let index = this.dataCollection.indexOf(this.selectedImage) + (forward ? 1 : -1);
- if (index >= 0 && index < this.dataCollection.length) {
- this.selectedImage = this.dataCollection[index];
- }
- }
- }
Add Comment
Please, Sign In to add comment