Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Component, OnInit } from '@angular/core';
import { SearchService } from 'app/search/service/search-service';
@Component({
selector: 'jhi-teaser-content',
templateUrl: './teaserContent.component.html',
styleUrls: ['./teaserContent.component.scss']
})
export class TeaserContentComponent implements OnInit {
public keywords: Array<String> = new Array<String>();
public contributors: Array<String> = new Array<String>();
public programmingLanguages: Array<String> = new Array<String>();
constructor(
private searchService: SearchService
) { }
ngOnInit(): void {
this.searchService.getKeywordsAutoComplete('')
.subscribe(
(data: Array<string>) => {
this.keywords = data;
}
,
() => {alert("Initializiation of keywords failed");}
);
this.searchService.getProgrammingLanguageAutoComplete('')
.subscribe(
(data: Array<string>) => {
this.programmingLanguages = data;
}
,
() => {alert("Initializiation of programming languages failed");}
);
this.searchService.getContributorAutoComplete('')
.subscribe(
(data: Array<string>) => {
this.contributors = data;
}
,
() => {alert("Initializiation of contributors failed");}
);
}
}