This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit fd989585 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Teasers werden jetzt verlinkt.

parent a88a52c4
2 merge requests!17Initial Merge to Prepare Release 1.0.0,!1Resolve "Metadaten konsolideren"
......@@ -3,19 +3,19 @@
<div class="col-sm-3">
<p style="padding-left: 30px;"><strong>Keywords</strong></p>
<ul style="list-style-type: circle;">
<li *ngFor="let keyWord of keywords"><a href="#">{{keyWord}}</a></li>
<li *ngFor="let keyWord of keywords"><a (click)="clickKeyword(keyWord)">{{keyWord}}</a></li>
</ul>
</div>
<div class="col-sm-3">
<p style="padding-left: 30px;"><strong>Programming Languages</strong></p>
<ul style="list-style-type: circle;">
<li *ngFor="let programmingLanguage of programmingLanguages"><a href="#">{{programmingLanguage}}</a></li>
<li *ngFor="let programmingLanguage of programmingLanguages"><a (click)="clickLanguage(programmingLanguage)">{{programmingLanguage}}</a></li>
</ul>
</div>
<div class="col-sm-3">
<p style="padding-left: 30px;"><strong>Contributors</strong></p>
<ul style="list-style-type: circle;">
<li *ngFor="let contributor of contributors"><a href="#">{{contributor}}</a></li>
<li *ngFor="let contributor of contributors"><a (click)="clickContributor(contributor)">{{contributor}}</a></li>
</ul>
</div>
</div>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import { SearchService } from 'app/search/service/search-service';
import {SearchInputComponent} from 'app/search-input/search-input.component'
import { Router } from '@angular/router';
@Component({
selector: 'jhi-teaser-content',
templateUrl: './teaserContent.component.html',
styleUrls: ['./teaserContent.component.scss'],
providers: [SearchInputComponent]
})
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,
private router: Router,
private searchInputComponent: SearchInputComponent) {}
ngOnInit(): void {
this.searchService.getKeywordsAutoComplete('').subscribe(
......@@ -41,4 +49,16 @@ export class TeaserContentComponent implements OnInit {
}
);
}
clickLanguage(programmingLanguage: String): void {
this.router.navigate(['/search'], { queryParams: { pl: programmingLanguage } });
}
clickContributor(contributor: String): void {
this.router.navigate(['/search'], { queryParams: { a: contributor } });
}
clickKeyword(keyWord: String): void {
this.router.navigate(['/search'], { queryParams: { kw: keyWord } });
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment