You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
606 B
TypeScript
25 lines
606 B
TypeScript
import { Directive, ElementRef, HostListener } from '@angular/core';
|
|
import { TranslatorService } from '../../services/translator/translator.service';
|
|
import { CommonService } from '../../services/common/common.service';
|
|
import { FeedbackService } from './feedback.service';
|
|
|
|
@Directive({
|
|
selector: '[feedback]'
|
|
})
|
|
export class FeedbackDirective {
|
|
|
|
constructor(
|
|
private cs: CommonService,
|
|
private ts: TranslatorService,
|
|
private el: ElementRef,
|
|
private feedBackService: FeedbackService
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
@HostListener('mousedown') onMouseEnter() {
|
|
this.feedBackService.vibrate();
|
|
}
|
|
}
|