1
|
import { Component, OnInit } from '@angular/core';
|
2
|
import {DocumentResponse} from '../../../model/DocumentResponse';
|
3
|
import {QueryService} from '../../../services/query.service';
|
4
|
|
5
|
@Component({
|
6
|
selector: 'app-browse',
|
7
|
templateUrl: './browse.component.html',
|
8
|
styleUrls: ['./browse.component.css']
|
9
|
})
|
10
|
export class BrowseComponent implements OnInit {
|
11
|
documents: DocumentResponse[] = null;
|
12
|
|
13
|
constructor( private queryService: QueryService ) { }
|
14
|
|
15
|
ngOnInit(): void {
|
16
|
this.queryService.getDocuments().subscribe( documents => {
|
17
|
this.documents = documents;
|
18
|
});
|
19
|
}
|
20
|
|
21
|
}
|