How to check if the passed reference is an instance of a particular ViewChild Reference in...

Discussão em 'Angular' iniciado por Luther, Novembro 19, 2024.

  1. Luther

    Luther Guest

    I have a viewchild ref in my .ts file like,

    @ViewChild('someDialog') someDialog: ElementRef;


    and in the .html file, I'm passing the reference back to a function like,

    <abc-dialog #someDialog (close)="onDialogClose(someDialog)"></abc-dialog>


    In my .ts file I want to check whether the passed reference to the onDialogClose() function is equal to someDialog view child ref.

    Any help is highly appreciated, thank you.

    Continue reading...

Compartilhe esta Página