1 |
64f28c6d
|
Ondřej Váně
|
import { Component } from '@angular/core';
|
2 |
f3d8e7de
|
Ondřej Váně
|
import { Query } from './model/Query';
|
3 |
|
|
import { QueryService} from './services/query.service';
|
4 |
|
|
import { QueryResponse } from './model/QueryResponse';
|
5 |
64f28c6d
|
Ondřej Váně
|
|
6 |
|
|
@Component({
|
7 |
|
|
selector: 'app-root',
|
8 |
|
|
templateUrl: './app.component.html',
|
9 |
|
|
styleUrls: ['./app.component.css']
|
10 |
|
|
})
|
11 |
|
|
export class AppComponent {
|
12 |
|
|
title = 'Fulltext search';
|
13 |
f3d8e7de
|
Ondřej Váně
|
response: QueryResponse = new QueryResponse();
|
14 |
|
|
|
15 |
|
|
constructor(private queryService: QueryService) { }
|
16 |
|
|
|
17 |
|
|
sendQuery(temp: Query) {
|
18 |
|
|
console.log(temp);
|
19 |
|
|
temp.date = new Date();
|
20 |
|
|
this.queryService.sendQuery(temp).subscribe( response => {
|
21 |
|
|
this.response = response;
|
22 |
|
|
});
|
23 |
|
|
}
|
24 |
64f28c6d
|
Ondřej Váně
|
}
|