Projekt

Obecné

Profil

« Předchozí | Další » 

Revize f3d8e7de

Přidáno uživatelem Ondřej Váně před více než 4 roky(ů)

Re #7656: Integrace frontendu a backendu

- propojení fe a be jedním post voláním
- vytvoření service na fe, která volá be
- na be je odeslán objekt dotazu v jsonu
- opraveny testy na be

Zobrazit rozdíly:

fe/fulltextsearch/src/app/app.component.html
1
<h1 style="text-align: center">Hello in fulltext search frontend</h1>
2
<h2>Test bootstrap</h2>
3
<div class="alert alert-primary" role="alert">
4
  This is a primary alert—check it out!
1
<div class="test">
2
  <h1 style="text-align: center">Hello in {{title}} frontend</h1>
3
  <form #queryForm="ngForm" (ngSubmit)="sendQuery(queryForm.value)">
4
    <span><b>Object query:</b> </span>{{ queryForm.value | json }}
5
    <div class="input-group mb-3">
6
      <input type="text" class="form-control" placeholder="Query" aria-describedby="basic-addon2" ngModel name="query">
7
      <div class="input-group-append">
8
        <button class="btn btn-outline-secondary" type="submit">Search</button>
9
      </div>
10
    </div>
11

  
12
    <div class="form-group">
13
      <label for="exampleFormControlTextarea1">Response:</label>
14
      <textarea readonly class="form-control" id="exampleFormControlTextarea1" rows="10">{{response.response}}</textarea>
15
    </div>
16
  </form>
5 17
</div>
6 18

  
7 19
<!-- Routing -->

Také k dispozici: Unified diff