This repository has been archived on 2025-06-18. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
casino/frontend/src/app/shared/directives/play-sound.directive.ts
Jan-Marlon Leibl 6d353cc202
All checks were successful
CI / Get Changed Files (pull_request) Successful in 10s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Has been skipped
CI / oxlint (pull_request) Successful in 26s
CI / eslint (pull_request) Successful in 39s
CI / prettier (pull_request) Successful in 30s
CI / Docker frontend validation (pull_request) Successful in 57s
CI / test-build (pull_request) Successful in 42s
style: fix formatting and add missing commas in code
2025-05-15 14:04:43 +02:00

15 lines
355 B
TypeScript

import { Directive, HostListener, inject } from '@angular/core';
import { AudioService } from '../services/audio.service';
@Directive({
selector: '[appPlaySound]',
standalone: true,
})
export class PlaySoundDirective {
private audioService = inject(AudioService);
@HostListener('click')
onClick() {
this.audioService.playBetSound();
}
}