Good night, I have a radio button on a form, where it is only called when it meets the condition of an * ngIf, however, when ngIf is accepted and this element is called, I need a method to execute without you need to click any button. Here are my code snippets:
<mat-radio-button name="G01" *ngIf="getClass0()" class="margem" value=0 checked>0</mat-radio-button>
Desabilitar(element){
var radio = document.getElementById(element) as HTMLInputElement;
if(radio.style.display == 'none'){
radio.style.display = 'table-cell';
}else radio.style.display = 'none';
}
I need this method to be called as soon as this radio button appears on the screen.