Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 443415f5

Přidáno uživatelem castic96 před více než 4 roky(ů)

Feature #7724: Implementace architektury FE
- přidání search-box component

Zobrazit rozdíly:

fe/fulltextsearch/src/app/components/pages/home/home.component.ts
1 1
import { Component, OnInit } from '@angular/core';
2
import { QueryResponse } from "../../../model/QueryResponse";
3
import { QueryService } from "../../../services/query.service";
4
import { Query } from "../../../model/Query";
5

  
6 2

  
7 3
@Component({
8 4
  selector: 'app-home',
......
10 6
  styleUrls: ['./home.component.css']
11 7
})
12 8
export class HomeComponent implements OnInit {
13
  title = 'Fulltext search';
14
  response: QueryResponse = new QueryResponse();
15

  
16
  constructor(private queryService: QueryService) { }
17

  
18
  sendQuery(temp: Query) {
19
    console.log(temp);
20
    temp.date = new Date();
21
    this.queryService.sendQuery(temp).subscribe( response => {
22
      this.response = response;
23
    });
24
  }
25 9

  
26 10
  ngOnInit() {
27

  
28 11
  }
29 12

  
30 13
}

Také k dispozici: Unified diff