All files / src/app/shared/components/back-button back-button.component.ts

93.33% Statements 14/15
75% Branches 9/12
66.67% Functions 2/3
100% Lines 8/8

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 1799x 99x   99x             99x 293x   293x 293x 99x  
import { Location } from '@angular/common';
import { Component, Input } from '@angular/core';
 
import { ActionLabelsI18n } from '../../constants/app.constants';
 
@Component({
  selector: 'cd-back-button',
  template: require('./back-button.component.html'),
  styles: []
})
export class BackButtonComponent {
  constructor(private location: Location, private actionLabels: ActionLabelsI18n) {}
 
  @Input() name: string = this.actionLabels.CANCEL;
  @Input() back: Function = () => this.location.back();
}