I know some of you will cringe with this question because I know that what I'm asking about isn't best practice. However, I'm going to ask anyway and hope to keep the abuse to a minimum.
ngIf removes elements from the DOM when the conditional statement is false. Is there a setting, flag, parameter, etc. that will alter the behavior of ngIf so that the elements stay in the DOM and are set to display: none instead? I'm not looking for a workaround, like [hidden], but I want to know if it is possible to change the behavior of *ngIf.
I was quickly (this is the keyword) updating an existing jQuery project. That project is using ".toggle()" methods for an accordion. As part of the update, the accordion items are now filtered with a ngIf. Because the jQuery code initializes the accordions when the app loads, removing them with ngIf, "uninitialized" them.
I used a workaround to address the issue. But I am still curious as to whether or not the option to change the behavior of ngIf is available.