1 import { Location } from '@angular/common';
2 import { Component, EventEmitter, Input, Output } from '@angular/core';
4 import { ActionLabelsI18n } from '~/app/shared/constants/app.constants';
7 selector: 'cd-back-button',
8 templateUrl: './back-button.component.html',
9 styleUrls: ['./back-button.component.scss']
11 export class BackButtonComponent {
12 @Output() backAction = new EventEmitter();
13 @Input() name: string = this.actionLabels.CANCEL;
15 constructor(private location: Location, private actionLabels: ActionLabelsI18n) {}
18 if (this.backAction.observers.length === 0) {
21 this.backAction.emit();