Below is a div
, and the first time you click on it, an opacity
style is added. I am looking to determine within the same function if this div
has an opacity
style set to 1.
@ViewChild('address')
private address: ElementRef;
public onClickAddress() {
this.renderer2.setStyle(this.address.nativeElement, 'opacity', '1');
// check if this element has an opacity style = 1
}
<div #address (click)="onClickAddress()">
</div>