1 import {Component, OnInit, Renderer2} from '@angular/core';
2 import {Router} from '@angular/router';
5 templateUrl: 'splash.component.html'
8 export class StaffSplashComponent implements OnInit {
10 catSearchQuery: string;
13 private renderer: Renderer2,
14 private router: Router
19 // Focus catalog search form
20 this.renderer.selectRootElement('#catalog-search-input').focus();
23 searchCatalog(): void {
24 if (!this.catSearchQuery) { return; }
26 /* Route to angular6 catalog
28 ['/staff/catalog/search'],
29 {queryParams: {query : this.catSearchQuery}}
33 // Route to AngularJS / TPAC catalog
34 window.location.href =
35 '/eg/staff/cat/catalog/results?query=' +
36 encodeURIComponent(this.catSearchQuery);