1
|
import { Component, OnInit } from '@angular/core';
|
2
|
import { Router } from '@angular/router';
|
3
|
import Utils from '../../../../../Utils';
|
4
|
import { QueryService } from '../../../../services/query/query.service';
|
5
|
|
6
|
@Component({
|
7
|
selector: 'app-browse-details',
|
8
|
templateUrl: './browse-details.component.html',
|
9
|
styleUrls: ['./browse-details.component.css']
|
10
|
})
|
11
|
export class BrowseDetailsComponent implements OnInit {
|
12
|
documentName: string;
|
13
|
source: Array<string> = [];
|
14
|
|
15
|
constructor(private router: Router, private service: QueryService) { }
|
16
|
|
17
|
ngOnInit(): void {
|
18
|
this.documentName = Utils.getStringAfterLastChar(this.router.url, '/');
|
19
|
|
20
|
this.service.getDocumentPictureByName(this.documentName).subscribe( documentPicture => {
|
21
|
this.source.push('data:image/png;base64,' + documentPicture.documentPicture);
|
22
|
});
|
23
|
}
|
24
|
|
25
|
}
|