All files / src/app/shell/header/header-error header-error.component.ts

100% Statements 5/5
75% Branches 3/4
100% Functions 2/2
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 212x 2x                   2x 1x         1x      
import { APP_BASE_HREF } from '@angular/common';
import { ChangeDetectionStrategy, Component, Inject, OnInit } from '@angular/core';
 
/**
 * The page header for error pages - the logo link reloads the app
 */
@Component({
  selector: 'ish-header-error',
  templateUrl: './header-error.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HeaderErrorComponent implements OnInit {
  constructor(@Inject(APP_BASE_HREF) private baseHref: string) {}
 
  homeHref: string;
 
  ngOnInit() {
    this.homeHref = this.baseHref && this.baseHref !== '/' ? `${this.baseHref}/home` : '/home';
  }
}