Projekt

Obecné

Profil

Stáhnout (861 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
import { Component, OnInit } from '@angular/core';
2
import { SearchRequest } from '../../../model/SearchRequest';
3
import { QueryService } from '../../../services/query.service';
4
import { Router } from '@angular/router';
5

    
6
@Component({
7
  selector: 'app-search-box',
8
  templateUrl: './search-box.component.html',
9
  styleUrls: ['./search-box.component.css']
10
})
11
export class SearchBoxComponent implements OnInit {
12
  expression: string
13

    
14
  constructor(private queryService: QueryService, private router: Router) { }
15

    
16
  ngOnInit(): void {
17
  }
18

    
19
  onSubmit() {
20
    const searchRequest: SearchRequest = new SearchRequest(this.expression, new Date());
21

    
22
    //TODO: naimplementovat searchPost
23
    /*
24
    this.queryService.searchPost(searchRequest).subscribe (() => {
25
      //TODO: ulozit objekt SearchResponse[]
26
      this.router.navigate(['/search']);
27
    });
28
    */
29
  }
30

    
31
}
(4-4/4)