mirror of
https://github.com/mempool/mempool.git
synced 2025-02-26 23:50:16 +01:00
13 lines
373 B
TypeScript
13 lines
373 B
TypeScript
import { Directive, ElementRef, Renderer2 } from '@angular/core';
|
|
import { environment } from '../environments/environment';
|
|
|
|
@Directive({
|
|
selector: '[data-cy]'
|
|
})
|
|
export class DataCyDirective {
|
|
constructor(private el: ElementRef, private renderer: Renderer2) {
|
|
if (environment.production) {
|
|
renderer.removeAttribute(el.nativeElement, 'data-cy');
|
|
}
|
|
}
|
|
}
|