import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core'; import { TranslatorService } from '../../services/translator/translator.service'; @Component({ selector: 'fab-button', templateUrl: './fab-button.component.html', styleUrls: ['./fab-button.component.scss'], }) export class FabButtonComponent implements OnInit { @Input() type:string; @Output() trigger = new EventEmitter(); public direction: any; constructor( ) { } ngOnInit() { console.log("type" + this.type); this.direction = TranslatorService.getCurrentDirection(); } public onClick() { this.trigger.emit(); } }