diff --git a/src/main/webapp/app/search/service/search-service.ts b/src/main/webapp/app/search/service/search-service.ts index e791d3c0457db1e573f339785d70d2d8bbedce2f..8fb2dc0f36d8064ed1bc56d922ffd76355c0a2c1 100644 --- a/src/main/webapp/app/search/service/search-service.ts +++ b/src/main/webapp/app/search/service/search-service.ts @@ -33,7 +33,7 @@ export class SearchService { const options: HttpParams = new HttpParams(); options.append('keyWordPrefix', prefix); return this.http.get<Array<string>>(this.resourceProgrammingLanguageAutoCompleteDetails, { - params: new HttpParams().set('progammingLanguagePrefix', prefix), + params: new HttpParams().set('programmingLanguagePrefix', prefix), }); } diff --git a/src/main/webapp/app/teaserContent/teaserContent.component.ts b/src/main/webapp/app/teaserContent/teaserContent.component.ts index 8b295c6c2118052fef01624ff080b7d51fd4723a..d122693d8db0525d19c782b97ea9cc9102ff6e97 100644 --- a/src/main/webapp/app/teaserContent/teaserContent.component.ts +++ b/src/main/webapp/app/teaserContent/teaserContent.component.ts @@ -5,46 +5,40 @@ import { SearchService } from 'app/search/service/search-service'; @Component({ selector: 'jhi-teaser-content', templateUrl: './teaserContent.component.html', - styleUrls: ['./teaserContent.component.scss'] + 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 - ) { } + 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");} - ); + this.searchService.getKeywordsAutoComplete('').subscribe( + (data: Array<string>) => { + this.keywords = data; + }, + () => { + alert('Initialization of keywords failed'); + } + ); + + this.searchService.getProgrammingLanguageAutoComplete('').subscribe( + (data: Array<string>) => { + this.programmingLanguages = data; + }, + () => { + alert('Initialization of programming languages failed'); + } + ); + this.searchService.getContributorAutoComplete('').subscribe( + (data: Array<string>) => { + this.contributors = data; + }, + () => { + alert('Initialization of contributors failed'); + } + ); } - }