refactored titles

This commit is contained in:
jonaswinkler
2020-12-14 20:59:18 +01:00
parent 2f6bf67d96
commit 8fbd11d9f8
10 changed files with 30 additions and 69 deletions

View File

@@ -1,9 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { ActivatedRoute, Router } from '@angular/router';
import { SearchHit } from 'src/app/data/search-result';
import { SearchService } from 'src/app/services/rest/search.service';
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-search',
@@ -28,7 +26,7 @@ export class SearchComponent implements OnInit {
errorMessage: string
constructor(private searchService: SearchService, private route: ActivatedRoute, private router: Router, private titleService: Title) { }
constructor(private searchService: SearchService, private route: ActivatedRoute, private router: Router) { }
ngOnInit(): void {
this.route.queryParamMap.subscribe(paramMap => {
@@ -36,7 +34,6 @@ export class SearchComponent implements OnInit {
this.searching = true
this.currentPage = 1
this.loadPage()
this.titleService.setTitle(`Search: ${this.query} - ${environment.appTitle}`)
})
}